Rcon admin - 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)
+--- Thread: Rcon admin (
/showthread.php?tid=290807)
Rcon admin -
grantism - 17.10.2011
How can I check if some one is an admin in rcon, i believe its like if(IsPlayerAdmin){ .. or something?
Re: Rcon admin -
$India$ - 17.10.2011
pawn Код:
for(new i < MAX_PLAYERS; i < 13; i++)
{
SendClientMessage(playerid, -1,"Rcon Admins");
if(IsPlayerAdmin(playerid))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string),"%s[ID: %d]", name, i);
SendClientMessage(playerid, -1, string);
}
}
I am not sure it will work or not.
But i tried.
Re: Rcon admin -
Kush - 17.10.2011
You initialize a loop and fail to use the selected variable?
Re: Rcon admin -
Sinner - 17.10.2011
pawn Код:
if(isPlayerAdmin(playerid) {
// Player is an RCON admin
}
OR, if you want to check for all the players in-game (post #2 is wrong code)
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++) {
if(isPlayerAdmin(i)) {
// Player i is RCON admin
// Add them to a string, or print their name or w/e here
}
}
Re: Rcon admin -
$India$ - 17.10.2011
Oh
it means my code was totally wrong.