CMD:eweapon(playerid, params[]) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; if ( !IsPlayerAdmin ( playerid ) )return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; new Arma,Municao; if ( sscanf ( params , "dd" , Arma , Municao ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Eweapon [ WEAPON ID ] [ AMMUNITION ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { GivePlayerWeapon ( v , Arma , Municao ) ; } } return 1; }
//------------------------------evento------------------------------------------ // CMD:event(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; EvenTStats = true; TheEvenT[playerid] = true; GetPlayerPos ( playerid , EventoPos [ 0 ] , EventoPos [ 1 ] , EventoPos [ 2 ] ) ; GetPlayerFacingAngle ( playerid , EventoPos [ 3 ] ) ; EventoInt = GetPlayerInterior ( playerid ) ; EventoVW = GetPlayerVirtualWorld ( playerid ) ; return SendClientMessageToAll ( 0xFF00FFFF,"[ EVENT ] : EVENT OPEN BY ADMIN ENTER ' /EVENT ' !" ) ; } else return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; } CMD:eclose(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats ) return SendClientMessage ( playerid , 0x00C0FFFF , "The event is already closed." ) ; for ( new v , b_2 = GetMaxPlayers(); v != b_2; v++ ) { if ( TheEvenT [ v ] ) { TheEvenT [ v ] = true ; EvenTStats = false ; } } return 1; } else return SendClientMessage ( playerid , 0x00C0FFFF , "You can not level this command") ;here ! } CMD:closeevent(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "The event is already open." ) ; SendClientMessageToAll( 0x33CCFFFF , "[EVENT]: The Admin just with the event!" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { TheEvenT [ v ] = false; EvenTStats = false; SpawnPlayer ( v ) ; } } return 1; } else return SendClientMessage ( playerid , 0x00C0FFFF , "You can not level this command") here !; } CMD:exitevent(playerid) { if ( TheEvenT [ playerid ] == true ) { new Float:Health; GetPlayerHealth ( playerid , Health ) ; if ( Health < 30.0 )return SendClientMessage ( playerid, 0xFF0000FF, "{F81414}[ERROR] Your life is too low." ) ; SpawnPlayer ( playerid ) ; ResetPlayerWeapons ( playerid ) ; TheEvenT [ playerid ] = false ; SetPlayerVirtualWorld ( playerid , 0 ) ; SetPlayerInterior ( playerid , 0 ) ; ResetPlayerWeapons ( playerid ) ; PlayerPlaySound ( playerid , 1057 , 0.0 , 0.0 , 0.0 ) ; } return 1; } CMD:ejoin(playerid) { if ( TheEvenT [ playerid ] == true ) return SendClientMessage ( playerid , 0x9FFF00FF , "{F81414}[ERROR]: You can not enter commands in event, type /ExitEvent out!" ) ; if ( !EvenTStats ) return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Float:Health; GetPlayerHealth ( playerid , Health ) ; if ( Health < 30.0 ) return SendClientMessage ( playerid, 0xFF0000FF, "{F81414}[ERROR] You can not teleport with little life." ) ; TheEvenT [ playerid ] = true ; ResetPlayerWeapons ( playerid ) ; format ( iString2 , sizeof ( iString2 ) , "{FFFFFF}' %s ' {F81414}It was for the event {FFFFFF}( /EVENT )", pName ( playerid ) ) ; SendClientMessageToAll ( 0x88FF9FFF , iString2 ) ; SetPlayerPos ( playerid , EventoPos [ 0 ] , EventoPos [ 1 ] , EventoPos [ 2 ] ) ; SetPlayerFacingAngle ( playerid , EventoPos [ 3 ] ) ; SetPlayerInterior ( playerid , EventoInt ) ; SetPlayerVirtualWorld ( playerid , EventoVW ) ; TogglePlayerControllable(playerid,0); return 1; } CMD:eweapon(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Arma,Municao; if ( sscanf ( params , "dd" , Arma , Municao ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Eweapon [ WEAPON ID ] [ AMMUNITION ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { GivePlayerWeapon ( v , Arma , Municao ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:setwv(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new world; if ( sscanf ( params , "i" , world ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Evw [ World ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerVirtualWorld ( v , world ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command"); here ! } CMD:efreezeall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { TogglePlayerControllable ( v , false ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:eunfreezeall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; if ( !IsPlayerAdmin ( playerid ) )return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; foreach(Player, v) { if ( TheEvenT [ v ] ) { TogglePlayerControllable ( v , true ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:ehealall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Float:Vida; if ( sscanf ( params , "f" , Vida ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Elife [ 0 - 100 ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerHealth ( v , Vida ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:earmourall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Float:Colete; if ( sscanf ( params , "f", Colete ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Earmor [ 0 - 100 ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerArmour ( v , Colete ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:ekit(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { GivePlayerWeapon( v , 22 , 150); GivePlayerWeapon( v , 26 , 150); GivePlayerWeapon( v , 28 , 150); ResetPlayerWeapons( v ); GivePlayerWeapon( v , 22 , 150); GivePlayerWeapon( v , 26 , 150); GivePlayerWeapon( v , 28 , 150); } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:esetwather(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "The event is already closed." ) ; if ( !IsPlayerAdmin ( playerid ) )return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; new weather; if ( sscanf ( params ,"i" , weather ) ) return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Esetweather (weather)" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerWeather ( v , weather ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! }
is it ok to change rcon by level admin?
!pawno send loose identificacion this original cmd Код:
CMD:eweapon(playerid, params[]) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; if ( !IsPlayerAdmin ( playerid ) )return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; new Arma,Municao; if ( sscanf ( params , "dd" , Arma , Municao ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Eweapon [ WEAPON ID ] [ AMMUNITION ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { GivePlayerWeapon ( v , Arma , Municao ) ; } } return 1; } \fenix.pwn(52983) : warning 217: loose indentation \gamemodes\fenix.pwn(53001) : warning 217: loose indentation \gamemodes\fenix.pwn(53053) : warning 217: loose indentation \gamemodes\fenix.pwn(53070) : warning 217: loose indentation \gamemodes\fenix.pwn(53084) : warning 217: loose indentation \gamemodes\fenix.pwn(53100) : warning 217: loose indentation \gamemodes\fenix.pwn(53116) : warning 217: loose indentation \gamemodes\fenix.pwn(53132) : warning 217: loose indentation \gamemodes\fenix.pwn(53152) : warning 217: loose indentation \gamemodes\fenix.pwn(53169) : warning 217: loose indentation Pawn compiler 3.2.3664 Код:
//------------------------------evento------------------------------------------ // CMD:event(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; EvenTStats = true; TheEvenT[playerid] = true; GetPlayerPos ( playerid , EventoPos [ 0 ] , EventoPos [ 1 ] , EventoPos [ 2 ] ) ; GetPlayerFacingAngle ( playerid , EventoPos [ 3 ] ) ; EventoInt = GetPlayerInterior ( playerid ) ; EventoVW = GetPlayerVirtualWorld ( playerid ) ; return SendClientMessageToAll ( 0xFF00FFFF,"[ EVENT ] : EVENT OPEN BY ADMIN ENTER ' /EVENT ' !" ) ; } else return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; } CMD:eclose(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats ) return SendClientMessage ( playerid , 0x00C0FFFF , "The event is already closed." ) ; for ( new v , b_2 = GetMaxPlayers(); v != b_2; v++ ) { if ( TheEvenT [ v ] ) { TheEvenT [ v ] = true ; EvenTStats = false ; } } return 1; } else return SendClientMessage ( playerid , 0x00C0FFFF , "You can not level this command") ;here ! } CMD:closeevent(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "The event is already open." ) ; SendClientMessageToAll( 0x33CCFFFF , "[EVENT]: The Admin just with the event!" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { TheEvenT [ v ] = false; EvenTStats = false; SpawnPlayer ( v ) ; } } return 1; } else return SendClientMessage ( playerid , 0x00C0FFFF , "You can not level this command") here !; } CMD:exitevent(playerid) { if ( TheEvenT [ playerid ] == true ) { new Float:Health; GetPlayerHealth ( playerid , Health ) ; if ( Health < 30.0 )return SendClientMessage ( playerid, 0xFF0000FF, "{F81414}[ERROR] Your life is too low." ) ; SpawnPlayer ( playerid ) ; ResetPlayerWeapons ( playerid ) ; TheEvenT [ playerid ] = false ; SetPlayerVirtualWorld ( playerid , 0 ) ; SetPlayerInterior ( playerid , 0 ) ; ResetPlayerWeapons ( playerid ) ; PlayerPlaySound ( playerid , 1057 , 0.0 , 0.0 , 0.0 ) ; } return 1; } CMD:ejoin(playerid) { if ( TheEvenT [ playerid ] == true ) return SendClientMessage ( playerid , 0x9FFF00FF , "{F81414}[ERROR]: You can not enter commands in event, type /ExitEvent out!" ) ; if ( !EvenTStats ) return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Float:Health; GetPlayerHealth ( playerid , Health ) ; if ( Health < 30.0 ) return SendClientMessage ( playerid, 0xFF0000FF, "{F81414}[ERROR] You can not teleport with little life." ) ; TheEvenT [ playerid ] = true ; ResetPlayerWeapons ( playerid ) ; format ( iString2 , sizeof ( iString2 ) , "{FFFFFF}' %s ' {F81414}It was for the event {FFFFFF}( /EVENT )", pName ( playerid ) ) ; SendClientMessageToAll ( 0x88FF9FFF , iString2 ) ; SetPlayerPos ( playerid , EventoPos [ 0 ] , EventoPos [ 1 ] , EventoPos [ 2 ] ) ; SetPlayerFacingAngle ( playerid , EventoPos [ 3 ] ) ; SetPlayerInterior ( playerid , EventoInt ) ; SetPlayerVirtualWorld ( playerid , EventoVW ) ; TogglePlayerControllable(playerid,0); return 1; } CMD:eweapon(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Arma,Municao; if ( sscanf ( params , "dd" , Arma , Municao ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Eweapon [ WEAPON ID ] [ AMMUNITION ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { GivePlayerWeapon ( v , Arma , Municao ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:setwv(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new world; if ( sscanf ( params , "i" , world ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Evw [ World ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerVirtualWorld ( v , world ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command"); here ! } CMD:efreezeall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { TogglePlayerControllable ( v , false ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:eunfreezeall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; if ( !IsPlayerAdmin ( playerid ) )return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; foreach(Player, v) { if ( TheEvenT [ v ] ) { TogglePlayerControllable ( v , true ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:ehealall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Float:Vida; if ( sscanf ( params , "f" , Vida ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Elife [ 0 - 100 ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerHealth ( v , Vida ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:earmourall(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; new Float:Colete; if ( sscanf ( params , "f", Colete ) )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Earmor [ 0 - 100 ]" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerArmour ( v , Colete ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:ekit(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { GivePlayerWeapon( v , 22 , 150); GivePlayerWeapon( v , 26 , 150); GivePlayerWeapon( v , 28 , 150); ResetPlayerWeapons( v ); GivePlayerWeapon( v , 22 , 150); GivePlayerWeapon( v , 26 , 150); GivePlayerWeapon( v , 28 , 150); } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } CMD:esetwather(playerid, params[]){ if(PlayerInfo[playerid][Level] >= 4) { if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "The event is already closed." ) ; if ( !IsPlayerAdmin ( playerid ) )return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ; new weather; if ( sscanf ( params ,"i" , weather ) ) return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}/Esetweather (weather)" ) ; foreach(Player, v) { if ( TheEvenT [ v ] ) { SetPlayerWeather ( v , weather ) ; } } return 1; } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");here ! } |
Changing rcon command to admin command is your decision
to fix the loose indentation add #pragma tabsize 0 above your script. |
CMD:event(playerid, params[])
{
if(PlayerInfo[playerid][Level] >= 4)
{
if ( !EvenTStats )return SendClientMessage ( playerid , 0x00C0FFFF , "{F81414}[ERROR]: The event is not open." ) ;
EvenTStats = true;
TheEvenT[playerid] = true;
GetPlayerPos ( playerid , EventoPos [ 0 ] , EventoPos [ 1 ] , EventoPos [ 2 ] ) ;
GetPlayerFacingAngle ( playerid , EventoPos [ 3 ] ) ;
EventoInt = GetPlayerInterior ( playerid ) ;
EventoVW = GetPlayerVirtualWorld ( playerid ) ;
return SendClientMessageToAll ( 0xFF00FFFF,"[ EVENT ] : EVENT OPEN BY ADMIN ENTER ' /EVENT ' !" ) ;
}
else return SendClientMessage ( playerid , 0x00C0FFFF , "You can not use this command..") ;
}