/slap slaps you above ID 0 not the player being slapped
#1

Hi guys I have a problem with my /slap command, when I use /slap on someone it slaps them above ID 0 not above themselves if you know what I mean.

pawn Код:
CMD:slap(playerid, params[])
{
new targetid;
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /slap [id]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "ERROR: Invalid ID.");
SetPlayerPos(targetid, x, y, z+5);
SendClientMessage(targetid, COLOR_GREY, "You have been slapped.");
return 1;
}
Reply


Messages In This Thread
/slap slaps you above ID 0 not the player being slapped - by Wizardking - 20.01.2015, 07:21
Re: /slap slaps you above ID 0 not the player being slapped - by Threshold - 20.01.2015, 08:00

Forum Jump:


Users browsing this thread: 1 Guest(s)