Don't show Names - 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: Don't show Names (
/showthread.php?tid=411165)
Don't show Names -
DerickClark - 27.01.2013
Hi,it don't show the names,if i go do /adminduty it show it how to make it show with out /adminduty?
Код:
CMD:admins(playerid,params[]) // Admins command
{
SendClientMessage(playerid,-1,"Admin Online");
for(new i = 0; i <MAX_PLAYERS; i++)
{
if(IsOnAdminDuty[i] == true)
{
new aname[24],astring[124];
GetPlayerName(playerid,aname,sizeof(aname));
format(astring,sizeof(astring),"%s (Duty)%s",aname);
SendClientMessage(playerid,-1,astring);
}
}
return 1;
}
Re: Don't show Names -
LarzI - 27.01.2013
pawn Код:
format(astring,sizeof(astring),"%s (Duty)%s", astring, aname);
Re: Don't show Names -
DerickClark - 27.01.2013
still don't work if i type /adminduty it shows name on /admins
how i make it show name all the time
Код:
Код:
C:\Userspawno\include\PPC_PlayerCommands.inc(5079) : error 017: undefined symbol "name"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Don't show Names -
DerickClark - 27.01.2013
if i type /admins can it show the names?
Re: Don't show Names -
Deron_Green - 27.01.2013
pawn Код:
CMD:admins(playerid, params[])
{
new bool:Count;
new str[45], Admin[MAX_PLAYER_NAME], str2[128];
for(new i, j = GetMaxPlayers(); i != j; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)// replace with ur variable
{
GetPlayerName(i, Admin, MAX_PLAYER_NAME);
format(str2, sizeof(str2), " ~Current Administrators Online~ ");
format(str, sizeof(str), "%s ", Admin);
SendClientMessage(playerid, -1, str2);
SendClientMessage(playerid, -1, str);
Count = true;
}
}
if(!Count) SendClientMessage(playerid, -1, "No Administrators Online!");
return 1;
}
U want something like this?
Re: Don't show Names -
DerickClark - 27.01.2013
it's spaming /admins
i mean like
Admin Online:
Test
if you type /adminduty
look like dis
Admin Online:
Test (Duty)
Re: Don't show Names -
DerickClark - 27.01.2013
Nvm it's working tys
Re: Don't show Names -
DerickClark - 27.01.2013
it show it 2 times how to make it show 1 time
Код:
CMD:admins(playerid, params[])
{
new bool:Count;
new str[45], Admin[MAX_PLAYER_NAME], str2[128];
for(new i = 0; i <MAX_PLAYERS; i++)
{
if (APlayerData[i][PlayerLevel] >= 1)// replace with ur variable
{
GetPlayerName(i, Admin, MAX_PLAYER_NAME);
format(str2, sizeof(str2), "Current Administrators Online");
format(str, sizeof(str), "%s ", Admin);
SendClientMessage(playerid, -1, str2);
SendClientMessage(playerid, -1, str);
Count = true;
}
if(IsOnAdminDuty[i] == true)
{
new aname[24],astring[124];
GetPlayerName(playerid,aname,sizeof(aname));
format(astring,sizeof(astring),"%s(Duty)%s",aname);
SendClientMessage(playerid,-1,astring);
}
}
if(!Count) SendClientMessage(playerid, -1, "No Administrators Online");
return 1;
}
Re: Don't show Names -
DerickClark - 28.01.2013
Any help?
Re: Don't show Names -
LarzI - 28.01.2013
Use 'else if' instead of 'if' on the second one.