Posts: 1,752
Threads: 338
Joined: Jul 2012
Reputation:
0
i wanna dis admin cmd for level 4
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins!");
Posts: 1,752
Threads: 338
Joined: Jul 2012
Reputation:
0
error 017: undefined symbol "PlayerInfo"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Posts: 1,752
Threads: 338
Joined: Jul 2012
Reputation:
0
COMMAND:Audio(playerid,params[]){
if(PlayerInfo[playerid][level] < 4) return SendClientMessage(playerid, COLOR_RED, "This command is only for admins");
new URL[250];
if(sscanf(params,"s",URL)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/Audio [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,COLOR_RED,"You have played a song for all players!");
format(cmdstr, sizeof(cmdstr), "Admin %s has started the Global Playback of{FFFFFF} %s", FormatName(playerid), URL);
SendClientMessageToAll(COLOR_RED, cmdstr);
return 1;
}
Posts: 213
Threads: 3
Joined: Oct 2011
Reputation:
0
What admin system you use ?
Posts: 1,752
Threads: 338
Joined: Jul 2012
Reputation:
0
PPC_Trucking admin system
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
Posts: 213
Threads: 3
Joined: Oct 2011
Reputation:
0
if(APlayerData[playerid][PlayerLevel] >= 4)return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins level 4!");
Posts: 1,752
Threads: 338
Joined: Jul 2012
Reputation:
0
error 017: undefined symbol "APlayerData"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one lin