Command does not work
#1

Help me the command / command will not work only works with pAdmin [playerid] == 5 and does not work with the organizer [playerid] I already have everything set and does not handle.

PHP код:
    if(strcmp(cmdtext"/comandosevento"true) == 0){
    if(!
organizador[playerid] || pAdmin[playerid] == 5)return SendClientMessage(playerid,0xFF0000FF,"| INFO | Apenas Organizadores de Evento e Admins Pode Usar Esse Comando");
    
SendClientMessage(playerid,0x0DBCDBFF,"Comandos: /criarevento /destrancarevento /trancarevento /carroevento /armarevento /fecharevento");
    
SendClientMessage(playerid,0x0DBCDBFF,"Comandos: /kickevento/sairdoevento");
    return 
1;
    } 
Reply
#2

1. Use a command processor
2. instead of == you should use <=, otherwise higher admin ranks than 5 won't be able to use it
3. You should start to think a little bit about code readability
Reply
#3

You should change the variable "organizador" to 1 if the player is the organizer and will be: if(organizador[playerid] == 1 || pAdmin[playerid] == 5)
Reply
#4

What the... How can this work with level 5 admin while you're telling the script if admin level = 5 then send error message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)