how to set dis admin cmd -
DerickClark - 24.12.2012
i wanna dis admin cmd for level 4
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins!");
Re: how to set dis admin cmd -
Biess - 24.12.2012
pawn Код:
if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins!");
Use your own admin variable.
Re : how to set dis admin cmd -
Rayan_black - 24.12.2012
Код:
if(PlayerInfo[playerid][level] < 4) return SendClientMessage(playerid, COLOR_RED, "This command is only for admins");
Re: how to set dis admin cmd -
DerickClark - 24.12.2012
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.
Re: how to set dis admin cmd -
ejb - 24.12.2012
Show your admin enums
Re: how to set dis admin cmd -
DerickClark - 24.12.2012
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;
}
Re : how to set dis admin cmd -
[HRD]Mar1 - 24.12.2012
What admin system you use ?
Re: how to set dis admin cmd -
DerickClark - 24.12.2012
PPC_Trucking admin system
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
Re : how to set dis admin cmd -
[HRD]Mar1 - 24.12.2012
if(APlayerData[playerid][PlayerLevel] >= 4)return SendClientMessage(playerid,COLOR_RED,"This command is only for Admins level 4!");
Re: how to set dis admin cmd -
DerickClark - 24.12.2012
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