SA-MP Forums Archive
Help about get ID 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help about get ID admin (/showthread.php?tid=93306)



Help about get ID admin - _ERO_ - 24.08.2009

I have this list admin

Код:
if(PlayerData[i][AdminLevel] == 1)
	 		{
        format(string, sizeof(string), "Moderator ~ %s", PlayerName(i));
        SendClientMessage(playerid, COLOUR_WHITE, string);
  		}
  		if(PlayerData[i][AdminLevel] == 2)
	 		{
        format(string, sizeof(string), "Mod+ ~ %s", PlayerName(i));
        SendClientMessage(playerid, COLOUR_WHITE, string);
  		}
  		if(PlayerData[i][AdminLevel] == 3)
	 		{
        format(string, sizeof(string), "Admin ~ %s", PlayerName(i));
        SendClientMessage(playerid, COLOUR_YELLOW, string);
  		}
  		if(PlayerData[i][AdminLevel] == 4)
	 		{
        format(string, sizeof(string), "Lead Admin ~ %s", PlayerName(i));
        SendClientMessage(playerid, COLOR_AZULBRI, string);
  		}
 		}
	}
	return 1;
And show in game:

Moderator ~ (name)
Mod+ ~ (name)
Adminr ~ (name)
Lead Admin ~ (name)

But i want show this.

Moderator ~ (name) (id)
Mod+ ~ (name) (id)
Adminr ~ (name) (id)
Lead Admin ~ (name) (id)

I try all, i not know how add the ID of player and show when the user typr /admins for know the ID of admins and send PM if is necesari

Someone know ho make it? Pls


Re: Help about get ID admin - CAR - 24.08.2009

I've this (with ID)

Код:
GetPlayerName(i, pname, sizeof(pname));
     format(string, sizeof(string), "Moderator ~ %s, ID: %d", pname, i,(i));
By me it works...


Re: Help about get ID admin - _ERO_ - 24.08.2009

this happend... error.

Код:
C:\Documents and Settings\ERO\Escritorio\Mi Servidor SAMP Pruebas Privadas\Server Pruebas Privado (Hosting)\gamemodes\rtscript.pwn(1589) : error 017: undefined symbol "pname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Help about get ID admin - woot - 24.08.2009

pawn Код:
format(string, sizeof(string), "Moderator ~ %s (ID: %d)", PlayerName(i), i);



Re: Help about get ID admin - _ERO_ - 24.08.2009

Quote:
Originally Posted by //exora
pawn Код:
format(string, sizeof(string), "Moderator ~ %s (ID: %d)", PlayerName(i), i);
Ok, now works, thanks!