Help with command
#1

What is problem in this cmd?? When i press /slap it slaps me and shows how to use command. When i press /slap 2 it slaps player. How can i fix bug when it slap me when i dont put ID in? Hope you understood it

Код:
CMD:slap(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
	    new targetid;
	    new Float:x;
		new Float:y;
		new Float:z;
	    GPP(targetid, x, y, z);
	    if(sscanf(params, "u", targetid))
	    {
	        SCM(playerid, 0xFFFFFF, "Koriscenje: /slap [ID]");
		}
		if(!IPC(targetid))
		{
		    SCM(playerid, 0xF81414, "Greska! Taj igrac nije na serveru");
		}
		SPP(targetid, x, y, z+5);
	}
	else
	{
	    SCM(playerid, 0xF81414, "Greska! Morate biti admin da bi koristili ovu komandu");
	}
	return 1;
}
Reply


Messages In This Thread
Help with command - by Micko123 - 26.04.2016, 16:43
Re: Help with command - by mongi - 26.04.2016, 20:59
Re: Help with command - by Nero_3D - 27.04.2016, 00:51
Re: Help with command - by GangstaSunny - 27.04.2016, 02:29
Re: Help with command - by Micko123 - 27.04.2016, 10:20
Re: Help with command - by CalvinC - 27.04.2016, 10:35

Forum Jump:


Users browsing this thread: 1 Guest(s)