08.06.2015, 07:27
I have used this code to make /go command with /gos command that enables/disables another players from teleporting to you but if i type /gos it always enable and don't disable so players can tele to me always!
(it compiles without any error)
please help me!
Thanks!
(it compiles without any error)
please help me!
Thanks!
Код:
CMD:go(playerid, params[]) { new giveplayerid; if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE:/go(playerid) to teleport to that player"); new Float:x; new Float:y; new Float:z; if(Goto == 1) { GetPlayerPos(giveplayerid, x,y,z); SetPlayerPos(playerid, x,y,z); } else if(Goto == 0) { SendClientMessage(playerid, 0xFF0000FF, "That player disabled teleports to him!"); } return 1; } CMD:gos(playerid, params[]) { if(Goto == 1) { SendClientMessage(playerid, 0xFF0000FF, "You have disabled player from teleporting to you!"); Goto = 0; } if(Goto == 0) { SendClientMessage(playerid, 0xFF0000FF, "You have enabled player from teleporting to you!"); Goto = 1; } return 1; }