/slap is only slapping me - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /slap is only slapping me (
/showthread.php?tid=330075)
/slap is only slapping me -
flashsnake - 31.03.2012
pawn Код:
CMD:slap(playerid, params[])
{
new sID;
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COL_GREEN, "SERVER: Ainult adminid alates level 2 saavad seda kasutada!");
if(sscanf(params, "u", sID))
{
new Float:x, Float:y, Float:z, Float:nurk;
GetPlayerPos(sID, x, y, z);
GetPlayerFacingAngle(sID, nurk);
SetPlayerPos(sID, Float:x, Float:y, Float:z+5);
SetPlayerFacingAngle(sID, Float: nurk);
}else{
SendClientMessage(playerid, COL_GREY, "SERVER: Хige kasutus: /slap ID");
}
return 1;
}
When I type /slap, it slaps me. But when I type /slap ID, "unknown command"
Re: /slap is only slapping me -
jotan. - 31.03.2012
What is this..
what your /slap should do lol
Re: /slap is only slapping me -
Reklez - 31.03.2012
Is your sscanf is updated? and what SAMP Client Version you are using.
Re: /slap is only slapping me -
Skribblez - 31.03.2012
Try this:
pawn Код:
CMD:slap(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new sID;
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COL_GREEN, "SERVER: Ainult adminid alates level 2 saavad seda kasutada!");
if(sscanf(params, "u", sID)) return SendClientMessage(playerid, COL_GREY, "SERVER: Хige kasutus: /slap ID");
new Float:x, Float:y, Float:z, Float:nurk;
GetPlayerPos(sID, x, y, z);
GetPlayerFacingAngle(sID, nurk);
SetPlayerPos(sID, Float:x, Float:y, Float:z+5);
SetPlayerFacingAngle(sID, Float: nurk);
}
return 1;
}
should work.
Re: /slap is only slapping me -
flashsnake - 31.03.2012
it is solved already, ty
Re: /slap is only slapping me -
Skribblez - 31.03.2012
Quote:
Originally Posted by flashsnake
it is solved already, ty
|
Did the code I post help you?