Slap Command Error -
Michael_Cruise - 26.11.2012
When I type other playerId. It always slaps id 0. Sometimes it shows that 461 ID not connected to the server when I type a reason long than 5 letters or 7.. ? Can someone help me what's wrong in this script?
Ok guys, There's a error with every fucking command!
When I type a playerid who is not even connected to the server example : 4.
It shows "Playerid (66553) is not connected to the server"
I am using SFCRRPG Gamemode!!
Please help me! How to fix it!
Код:
CMD:slap(playerid,params[])
{
if(AdminLevel[playerid] <= 2) return SendClientMessage(playerid,COLOR_ERROR,"You don't have access to this command");
new ID, cmdreason, string[126], Float: PPos[3];
if(sscanf(params,"us[100]",ID,cmdreason))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /slap [playerid] [Reason]");
return 1;
}
if(IsSpawned[ID] != 1)
{
format(string,sizeof(string),"%s(%d) must be alive and spawned in order to slap him",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
GetPlayerPos(ID, PPos[0], PPos[1], PPos[2]);
SetPlayerPos(ID, PPos[0], PPos[1], PPos[2]+4);
format(string,sizeof(string),"[ADMIN] %s(%d) has slapped %s(%d)",PlayerName(playerid),playerid,PlayerName(ID),ID);
SendClientMessageToAll(COLOR_ADMIN,string);
GameTextForPlayer(ID,"Slapped!", 3000, 1);
return 1;
}
Re: Slap Command Error -
Smally - 26.11.2012
Is it just for that command or others aswell?
Re: Slap Command Error -
Michael_Cruise - 26.11.2012
Quote:
Originally Posted by Lido
Is it just for that command or others aswell?
|
Only for this command!
Help plz
Re: Slap Command Error -
GoldZoroGrab - 26.11.2012
try
if(sscanf(params,"uis[100]",ID,cmdreason))
Re: Slap Command Error -
Michael_Cruise - 26.11.2012
Quote:
Originally Posted by GoldZoroGrab
try
if(sscanf(params,"uis[100]",ID,cmdreason))
|
It's working but the cmdreason is not showing in the message!
Re: Slap Command Error -
Michael_Cruise - 26.11.2012
Ok guys, There's a error with every fucking command!
When I type a playerid who is not even connected to the server example : 4.
It shows "Playerid (66553) is not connected to the server"
I am using SFCRRPG Gamemode!!
Please help me! How to fix it!
Re: Slap Command Error -
GoldZoroGrab - 26.11.2012
for this command "slap" or all commands?
Re: Slap Command Error -
Smally - 26.11.2012
Alright, you need to recompile your script using the latest version of SSCANF from the thread, and run using that plugin in your server.
Re: Slap Command Error -
Michael_Cruise - 26.11.2012
Quote:
Originally Posted by GoldZoroGrab
for this command "slap" or all commands?
|
Now for every commands lol!
Re: Slap Command Error -
CentyPoo - 26.11.2012
Update all your plugins and includes then re-compile.