CMD:admins(playerid, params[]) { new sendername[MAX_PLAYER_NAME],string[64 + MAX_PLAYER_NAME]; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerAdmin(i)) { GetPlayerName(i, sendername, sizeof(sendername)); format(string, 100, "Online Admins: %i", IsPlayerAdmin(i)); SendClientMessage, COLOR_GREEN, string); } } } return 1; }
C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(869) : warning 217: loose indentation C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1017) : warning 204: symbol is assigned a value that is never used: "rand" C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1387) : error 076: syntax error in the expression, or invalid function call C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1387) : error 029: invalid expression, assumed zero C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1387) : warning 215: expression has no effect C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1391) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
SendClientMessage(i,COLOR_GREEN, string);
SendClientMessage, COLOR_GREEN, string);
format(string, 128, "Online Admins: %s", sendername);
C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(869) : warning 217: loose indentation C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1017) : warning 204: symbol is assigned a value that is never used: "rand" C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1388) : error 001: expected token: ";", but found "}" C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1391) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(869) : warning 217: loose indentation C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1017) : warning 204: symbol is assigned a value that is never used: "rand" C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(138 ![]() C:\Users\Jacob\Desktop\Roleplay Base Script\gamemodes\hrp.pwn(1391) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
CMD:admins(playerid, params[]) { new sendername[MAX_PLAYER_NAME],string[64 + MAX_PLAYER_NAME]; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerAdmin(i)) { GetPlayerName(i, sendername, sizeof(sendername)); format(string, 100, "Online Admins: %i", IsPlayerAdmin(i)); SendClientMessage, COLOR_GREEN, string); } } } return 1; }
This is the correct way to use a function.
pawn Код:
pawn Код:
|
The string should be something like this:-
(according to your getplayername) pawn Код:
|
CMD:admins(playerid, params[])
{
new sendername[MAX_PLAYER_NAME],string[64 + MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 100, "Online Admins: %s", sendername);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
}
return 1;
}