Unknown Command for ID 25+ - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Unknown Command for ID 25+ (
/showthread.php?tid=264331)
Unknown Command for ID 25+ -
Lynn - 25.06.2011
Fixed.
Re: Unknown Command for ID 25+ -
Willow - 25.06.2011
Check your code, maybe somewhere there is
Код:
#define MAX_PLAYERS 25
Re: Unknown Command for ID 25+ -
Lynn - 25.06.2011
Lmfao, nope.
Re: Unknown Command for ID 25+ - rjjj - 25.06.2011
It is better change your commands to these ones
.
pawn Код:
CMD:stats(playerid, params[])
{
#pragma unused params
ShowPlayerStats(playerid, playerid);
return true;
}
CMD:check(playerid, params[])
{
#pragma unused params
new giveplayerid;
if(IsAdmin(playerid,1))
{
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{F3FF02}USAGE:{33AA33} /check [playerid]");
ShowPlayerStats(playerid, giveplayerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use this command !");
}
return true;
}
You said only these commands are sending the Unknown Command message
, so, you have to put the
ShowPlayerStats function here in the thread
.
I hope that i have helped
.
Re: Unknown Command for ID 25+ -
shitbird - 25.06.2011
It proprably has something to do with the ShowPlayerStats function. Could you show us the code?
Re: Unknown Command for ID 25+ -
gimini - 25.06.2011
Btw, your "check" command wouldn't work
UPD:
pawn Код:
CMD:check(playerid, params[])
{
if(IsNull(params)) return SendClientMessage(playerid, COLOR_GREY, "{F3FF02}USAGE:{33AA33} /check [playerid]");
if(IsAdmin(playerid, 1))
{
new giveplayerid = strval(params);
if(IsPlayerConnected(giveplayerid)) ShowPlayerStats(playerid, giveplayerid);
else SendClientMessage(playerid, COLOR_GREY, " Player is not online");
}
else SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use this command !");
return true;
}
Re: Unknown Command for ID 25+ -
Lynn - 25.06.2011
What are you talking about? It does work...Just not for Player ID 25+.
Anyway, Topic updated.
Re: Unknown Command for ID 25+ -
Jefff - 25.06.2011
pawn Код:
new name[MAX_PLAYER_NAME];
new string[128];
name = pName(targetid);
if (name[targetid] == '_')
name[targetid] = ' ';
MAX_PLAYER_NAME is 24 so if U have ID 25+
pawn Код:
if (name[targetid] == '_')
name[targetid] = ' ';
then array is crash and gives unknown command
btw
pawn Код:
COMMAND:check(playerid,params[])
{
new giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
giveplayerid returns 0 here so if ID 0 is not connected command dont work xd