20.01.2015, 07:21
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;
}