SA-MP Forums Archive
How to make a leave command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make a leave command (/showthread.php?tid=503485)



How to make a leave command - Jacob756 - 29.03.2014

I want to make a /leave cmd to leave some zones
For example
In a dm map or whatever,when they die,I want the player to get respawn in the same map and leave by typing /leave.
And when you type other cmd than /leave in a dm zone,it ignores the cmd and show a game text saying /leave
Plz help I need it for my server.
-----------------------
Better example
I made a map called /minigun
Players went their,when they die they get auto respawn in the same map (/minigun) and when they type command like /pm,the server ignores it and show gametext saying /leave and when they leave they get respawn anywhere in the city


Re: How to make a leave command - Jacob756 - 29.03.2014

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
state a global variable getting if a player is in that minigun arena or not, then when he dies and his variable is 1 or whatever he gets teleported to there.

And for the leave cmd. Use OnPlayerCommandReceived, if this variable is 1... and the cmd isnt /leave, hell gets that message.

And when the player types /leave he gets that variable off, as 0 or anything, and you respawn them.
Can you give me the pawn code?