Just a little help please - 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: Just a little help please (
/showthread.php?tid=94278)
Just a little help please -
Erkan - 28.08.2009
If I use that I see me as Leader thats ok, but I see other members as leader too :S , only in this list, what's wrong here ?
Код:
if(strcmp(cmd, "/gdonline", true) == 0)
{
if(PlayerData[playerid][Gundealer] < 1) return SendClientMessage(playerid, RED, "SERVER MESSAGE: You need to be Official Gundealer.");
SendClientMessage(playerid, RED, "People with Gundealer rights:");
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1 && PlayerData[i][Gundealer] >= 1 && PlayerData[i][Gundealer] < 1338)
{
new rank[256];
if (PlayerData[playerid][Gundealer] == 1) rank = "Member";
else if (PlayerData[playerid][Gundealer] == 2) rank = "Co Leader";
else if (PlayerData[playerid][Gundealer] == 3) rank = "Leader";
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "%s: %s", rank, sendername);
SendClientMessage(playerid, ORANGE, string);
}
}
return 1;
}
Re: Just a little help please -
Adamrcook - 28.08.2009
I don't understand what your asking...
Re: Just a little help please -
Erkan - 28.08.2009
This script does not work perfectly it's bugged a little bit, if I join the Server and do /gdonline I see everyone as Leader, there is something wrong, it comes form code.
Re: Just a little help please -
Erkan - 28.08.2009
any one know how to fix ?
Re: Just a little help please -
Adamrcook - 28.08.2009
Do you have it so it sets there Gun Dealer level to 0 on register?
Re: Just a little help please -
Erkan - 29.08.2009
Yeah, only this thing is the problem it shows it wrong, but the ranks are right
Re: Just a little help please -
Danny_Costelo - 29.08.2009
http://pastebin.com/m49d0e001
^^ Fixed it.
Your problem was you where checking the original playerid, not the loop that you made.