• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Crash for certain players

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
Is there a trigger that can start an infinite loop for specific players?

I want to crash the client if a player on my map buys boots first, but only crash the specific noob
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Use GetLocalPlayer() to drop the player in quesition out of sync (disconnect them) from the rest of the players.

This is as easy as 123, basically create a location for him at point 0,0 and he will drop out of sync.

Then create your infinite loop (again within the asyncronous block to stop you creashing the rest of the players). This will have to be stackless (I advise an event related loop).

Incase you are not aware, GetLocalPlayer() returns a different player for each computer instance running your map for a specific host instance. Computer slots or empty slots or neutral slots can not be returned via GetLocalPlayer().

An example of its use...
JASS:
//before code.
if GetLocalPlayer == yourplayer then
//OOS code.
endif
//after code.
The before and after code will run for all players. The OOS code will run only for the human player playing the player contained in the variable yourplayer.

Be advised that adding something like this to a map will most likly get the map rejected due to being totally stupid as far as programming goes and being totally retarded as far as map design goes. The rejection reason could be one of the following as an example. . .
Map has buggy code, falls into infinite loop.
Map could cause data loss due to itentional crashing on single core processors.
Map does totally stupid things for no reason like crashing players for buying an item.

How many comercial games do you play that specially and with intent crash players for doing something? I in my experience have not encountered any such game and probably with a very good reason.
 
Status
Not open for further replies.
Top