help with this cmd - 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 with this cmd (
/showthread.php?tid=184573)
help with this cmd -
dark_clown - 20.10.2010
lol, i tryed to make dcmd_admins but it only shows the
name to who typed admin and it sends the message to all
why?
Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PInfo[i][Level] > 1)
{
format(string, sizeof string, "(%i)%s/n/",i, pName);
SendClientMessage(i,LGREEN, string);
}
}
return 1;
}
Re: help with this cmd -
Scenario - 20.10.2010
Seriously? Look at your code again...
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new string[128], name[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PInfo[i][Level] > 1)
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s Level: %d", name, PInfo[i][Level]);
SendClientMessage(playerid, LGREEN, string);
}
}
return 1;
}
That should do the trick. Nothing advanced...