how to set dis admin cmd
#1

i wanna dis admin cmd for level 4



if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins!");
Reply
#2

pawn Код:
if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins!");
Use your own admin variable.
Reply
#3

Код:
if(PlayerInfo[playerid][level] < 4) return SendClientMessage(playerid, COLOR_RED, "This command is only for admins");
Reply
#4

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.
Reply
#5

Show your admin enums
Reply
#6

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;
}
Reply
#7

What admin system you use ?
Reply
#8

PPC_Trucking admin system
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
Reply
#9

if(APlayerData[playerid][PlayerLevel] >= 4)return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins level 4!");
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)