Tele!
#2

Quote:
Originally Posted by ironmen
Посмотреть сообщение
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!
Код:
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;
}
Whats the problem? when you do /go in game then whats happens?
Reply


Messages In This Thread
Tele! - by ironmen - 08.06.2015, 07:27
Re: Tele! - by GTLS - 08.06.2015, 08:46
Re: Tele! - by bgedition - 08.06.2015, 08:52
Re: Tele! - by ironmen - 08.06.2015, 08:55
Re: Tele! - by GTLS - 08.06.2015, 08:58
Re: Tele! - by bgedition - 08.06.2015, 09:01
Re: Tele! - by GTLS - 08.06.2015, 09:03
Re: Tele! - by ironmen - 08.06.2015, 09:20
Re: Tele! - by GTLS - 08.06.2015, 09:22
Re: Tele! - by ironmen - 08.06.2015, 09:23

Forum Jump:


Users browsing this thread: 2 Guest(s)