Command does not work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command does not work (
/showthread.php?tid=623927)
Command does not work -
baela - 07.12.2016
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;
}
Re: Command does not work -
BiosMarcel - 08.12.2016
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
Re: Command does not work -
MattMaximum - 08.12.2016
You should change the variable "organizador" to 1 if the player is the organizer and will be: if(organizador[playerid] == 1 || pAdmin[playerid] == 5)
Re: Command does not work - iLearner - 08.12.2016
What the... How can this work with level 5 admin while you're telling the script if admin level = 5 then send error message.