Command that returns SERVER: Unknown Command. - 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: Command that returns SERVER: Unknown Command. (
/showthread.php?tid=140952)
Command that returns SERVER: Unknown Command. -
pagie1111 - 11.04.2010
This command:
pawn Код:
COMMAND:rank(playerid,params[])
{
new string[128];
{
new p,s;
SendClientMessage(playerid,LIME,"Players Ranks");
GetPlayerAllRanks(playerid,p,s);
if(p != INVALID_RANK_ID)
{
format(string,sizeof(string),"Police Rank: %s",GetPlayerPoliceRankName(playerid));
SendClientMessage(playerid,LIME,string);
}
if(s != INVALID_RANK_ID)
{
format(string,sizeof(string),"S.W.A.T Rank: %s",GetPlayerSwatRankName(playerid));
SendClientMessage(playerid,LIME,string);
}
}
return 1;
}
But, it comes up
Player Ranks
SERVER: Unknown Command
Re: Command that returns SERVER: Unknown Command. -
cessil - 11.04.2010
you've forgotten your sscanf
Re: Command that returns SERVER: Unknown Command. -
pagie1111 - 11.04.2010
I know what I forgot!
#pragma unused params
EDIT: No that didn't work
Re: Command that returns SERVER: Unknown Command. -
Gamer_Z - 11.04.2010
if i'm not wrong the function GetPlayerAllRanks(playerid,p,s); returns 0 ...
Re: Command that returns SERVER: Unknown Command. -
pagie1111 - 11.04.2010
pawn Код:
stock GetPlayerAllRanks(playerid,&police,&swat)
{
police = pRank[playerid][p_police_rank];
swat = pRank[playerid][p_swat_rank];
}
??
Re: Command that returns SERVER: Unknown Command. -
Gamer_Z - 11.04.2010
hmm the code is all right..
try first
pawn Код:
stock GetPlayerAllRanks(playerid,&police,&swat)
{
police = pRank[playerid][p_police_rank];
swat = pRank[playerid][p_swat_rank];
return 1;
}
and if this doesn't work.. maybe try to disable this command and debug your code.
Re: Command that returns SERVER: Unknown Command. -
pagie1111 - 11.04.2010
Nope didn't work. :S
Re: Command that returns SERVER: Unknown Command. -
cessil - 11.04.2010
well I think there's something wrong with
GetPlayerAllRanks(playerid,p,s);
or
GetPlayerPoliceRankName(playerid)
so paste those codes
Re: Command that returns SERVER: Unknown Command. -
¤Adas¤ - 11.04.2010
Quote:
Originally Posted by cessil
well I think there's something wrong with
GetPlayerAllRanks(playerid,p,s);
or
GetPlayerPoliceRankName(playerid)
so paste those codes
|
Brain off
Re: Command that returns SERVER: Unknown Command. -
pagie1111 - 11.04.2010
I cant give out too much code, but I found another way around it. All thanks go to you who helped