Block goto command in dm's
#4

When the player leaves the Minigun event he should be disarmed. Now, in order to do this, you need some variable that changes depending on where the player is (normal world, minigun arena etc).
- Player goes to the arena ( when he does, do something like IsInMinigunArena[playerid] = 1; )
- Player plays in the arena (IsInMinigunArena[playerid] stays 1, you don't have any reason to change it)
- Player leaves the arena (find all the ways of doing this and disarm the player). For goto, it's a bit tricky, because you don't want to disarm the player every time he uses the command, so you should have something like this in your goto command:
pawn Code:
if(IsInMinigunArena[playerid] == 1) //if he was in the minigun arena when he used goto, this should be true
{
    //disarm him
    IsInMinigunArena[playerid] = 0; //set the variable to 0, because he is not there anymore
}
Good luck!
Reply


Messages In This Thread
Block goto command in dm's - by sirvanec - 06.02.2015, 13:27
Re: Block goto command in dm's - by ATGOggy - 06.02.2015, 13:32
Re: Block goto command in dm's - by sirvanec - 06.02.2015, 13:59
Re: Block goto command in dm's - by HazardouS - 06.02.2015, 14:06
Re: Block goto command in dm's - by sirvanec - 06.02.2015, 14:30
Re: Block goto command in dm's - by HazardouS - 06.02.2015, 14:52
Re: Block goto command in dm's - by Maximus0 - 06.02.2015, 16:29
Re: Block goto command in dm's - by Saliim - 13.04.2016, 15:39

Forum Jump:


Users browsing this thread: 1 Guest(s)