Help Me Out - 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: Help Me Out (
/showthread.php?tid=140876)
Help Me Out -
[WF]Demon - 10.04.2010
hi i have a /setrank command yet it dosent set the rank, i need it to do so if you can find the problem in here please fix / tell me what is wrong, it compiles no warnings or errors.
pawn Код:
if(strcmp(cmd, "/setrank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setrank [playerid/PartOfName] [Rank]");
return 1;
}
new playa;
new rank;
playa = ReturnUser(tmp);
rank = strval(tmp);
if(Admin[playerid] > 8)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
dUserSetINT(PlayerName(playa)).("rank",rank);
Rank[playa] = rank;
format(string, sizeof(string), "Admin %s gave you %s Rank!", sendername, rank);
SendClientMessage(playa, COLOR_YELLOW, string);
print(string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You Are Not An Admin!");
}
}
}
return 1;
}
Thanks
Re: Help Me Out -
[WF]Demon - 11.04.2010
-BUMP- this is semi-important i need a reply
Re: Help Me Out -
cessil - 11.04.2010
does it say "Admin %s gave you %s Rank!" correctly when you do the command?
you don't need this check either
Код:
if(playa != INVALID_PLAYER_ID)
{