sscanf command problem
#1

Making admin commands with sscanf, the commands won't work for ID 0, it just does the action for yourself (like, /kick 5 and it kicks you instead of ID 5)

my code, the problem shouldn't be in it because copypasting other peoples goto commands won't work either.
Код:
command(goto, playerid, params[])
{
	new tPlayer;
	if(!sscanf(params, "u", tPlayer))
 	{
	  	new Float:X, Float:Y, Float:Z, string[128];
	 	SetPlayerInterior(playerid, GetPlayerInterior(tPlayer));
	  	GetPlayerPos(tPlayer, X, Y, Z);
	   	SetPlayerPos(playerid, X, Y, Z + 5);
		format(string, sizeof(string), ""GREEN"Successfully teleported to "YELLOW"'%s'"GREEN".", GetName(tPlayer));
		SendClientMessage(playerid, -1, string);
		SendClientMessage(tPlayer, -1, ""RED"An admin has teleported to you.");
	}
	else return SendClientMessage(playerid, -1, ""RED"Usage: /goto <player>");
	return 1;
}
Reply


Messages In This Thread
sscanf command problem - by spedico - 22.12.2011, 15:00
Re: sscanf command problem - by Ash. - 22.12.2011, 15:03
Re: sscanf command problem - by spedico - 22.12.2011, 15:06
Re: sscanf command problem - by Tee - 22.12.2011, 15:23
Re: sscanf command problem - by spedico - 22.12.2011, 15:25
Re: sscanf command problem - by Tee - 22.12.2011, 15:31
Re: sscanf command problem - by spedico - 22.12.2011, 15:38
Re: sscanf command problem - by Tee - 22.12.2011, 15:43
Re: sscanf command problem - by wildcookie007 - 22.12.2011, 16:22

Forum Jump:


Users browsing this thread: 2 Guest(s)