CMD:asay(playerid, params[]){
new pname[MAX_PLAYER_NAME], strings[128];
if(APlayerData[playerid][PlayerLevel] < 0) return 0;
GetPlayerName(playerid, pname, sizeof(pname));
format(strings, sizeof(strings), "Admin %s: %s", pname, params);
SendClientMessageToAll(0x1874CDAA, strings);
return 1;
}
COMMAND:a(playerid,params[])
{
if(PlayerAcc[playerid][AdminLevel] >= 1) //replace THIS WITH YOUR own admin variable of your enum
{
new Announce[50];
if(sscanf(params, "s[50]",Announce)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /asay [message]");
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
new astring[256];
format(astring,sizeof(astring),"* Admin %s(%d): %s",pname,playerid,Announce);
SendClientMessageToAll(ANNOUNCEMENT,astring);
}
else SendClientMessage(playerid,red,"ERROR: You must be an Admin level 1 or higher to perform this command!");
return 1;
}
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1500) : error 021: symbol already defined: "cmd_asay"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : warning 217: loose indentation
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : warning 215: expression has no effect
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 029: invalid expression, assumed zero
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
CMD:a(playerid, params[]){
if(PlayerInfo[playerid][pAdmin] < 1) return 0;
if(sscanf(params,"u", strings)) return SendClientMessage(playerid,COLOR_LIGHTBLUE, "USAGE: {FFFFFF}/a [text]");
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(strings, sizeof(strings), "Admin %s: %s", params, name);
SendClientMessageToAll(0x1874CDAA, strings);
return 1;
}
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 017: undefined symbol "PlayerAcc"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : warning 215: expression has no effect
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 029: invalid expression, assumed zero
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
PHP Code:
|
CMD:a( playerid, params[ ] ) { if ( PlayerInfo[ playerid ][ Level ] < 1 ) return SendClientMessage( playerid, 0xFF0000FF, "ERROR: You need to be admin level 1, to use this command!" ); new lsAnn[ 128 ]; if ( sscanf( params, "s[128]", lsAnn ) ) return SendClientMessage( playerid, 0xFF0000FF, "USAGE: /a [Text]" ); new string[ 129 ]; format( string, sizeof( string ), "Admin %s: %s", PlayerName( playerid ), lsAnn ); SendClientMessageToAll( COLOR, string ); return 1; }
PHP Code:
|
CMD:asay ( playerid , params [] )
{
if ( !IsPlayerAdmin ( playerid ) ) return SendClientMessage ( playerid , -1 , "Your not admin" ) ;
new pName [ MAX_PLAYER_NAME ] , Str [ 128 ] ;
GetPlayerName ( playerid , pName , MAX_PLAYER_NAME ) ;
format ( Str , 128 , "%s says : %s" , pName , params ) ;
SendClientMessageToAll ( -1 , Str ) ;
return 1;
}
pawn Code:
|