help do not use commands in event -
nbx2000 - 18.05.2018
hello how can I add a variable I do not command an example when they enter the event / ejoin no longer seems to use commands
Код:
CMD:event(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 )", GetPName ( playerid ) ) ;
SendClientMessageToAll ( 0x88FF9FFF , iString2 ) ;
SetPlayerPos ( playerid , EventoPos [ 0 ] , EventoPos [ 1 ] , EventoPos [ 2 ] ) ;
SetPlayerFacingAngle ( playerid , EventoPos [ 3 ] ) ;
SetPlayerInterior ( playerid , EventoInt ) ;
SetPlayerVirtualWorld ( playerid , EventoVW ) ;
return 1;
}
Re: help do not use commands in event -
kovac - 18.05.2018
I really can't understand you. Please use gooogle translator.
As I can see, you already do check if player is in event and if so, return error. What is wrong?
Re: help do not use commands in event -
nbx2000 - 18.05.2018
as I can put a variable not commands in system events. for the player tipe ejoin do not use cmds
Re: help do not use commands in event -
kovac - 18.05.2018
I misunderstood, sorry.
To prevent every ZCMD command from being used in event, you can do this;
PHP код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(TheEvenT[playerid]){
SendClientMessage(playerid, COLOR_RED, "{F81414}[ERROR]: You can not enter commands in event, type /ExitEvent out!");
return 0;
}
return 1;
}
PS: I suggest you to name the variable like IsInEvent[playerid] for ease of reference
Re: help do not use commands in event -
nbx2000 - 18.05.2018
IT PROVES IT AND NO COMMANDS OF THE GAMEMODE
Re: help do not use commands in event -
kovac - 18.05.2018
I can't understand you, feel free to reply in your language
Re: help do not use commands in event -
nbx2000 - 18.05.2018
ahora no anda ningun comandos de todos del server
Re: help do not use commands in event -
kovac - 18.05.2018
Quote:
Originally Posted by nbx2000
ahora no anda ningun comandos de todos del server
|
Como dije, eso bloquea todos los comandos para el jugador que estб en el evento. їEntonces que quieres hacer?
Re: help do not use commands in event -
dani18 - 19.05.2018
Quote:
Originally Posted by nbx2000
ahora no anda ningun comandos de todos del server
|
Inglйs o espaсol? lol.
Re: help do not use commands in event -
JasonRiggs - 19.05.2018
prueba esto
PHP код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(TheEvenT[playerid]){
SendClientMessage(playerid, COLOR_RED, "{F81414}[ERROR]: You can not enter commands in event, type /ExitEvent out!");
return 0;
}
else if(!TheEvenT[playerid]) return 1;
}