Error, Someone help me? - 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: Error, Someone help me? (
/showthread.php?tid=624387)
Error, Someone help me? -
baela - 15.12.2016
I've done everything for this command to work, it takes before, as you can see it is defined in IsPlayerAdmin and in the organizer
I already tried to do so tbm organizer [playerid] == 1 of all forms but it does not work it just returns the message saying that I am not an organizaodr
PHP код:
if(strcmp(cmd, "/comandosevento", true) == 0)
{
if(!IsPlayerAdmin(playerid) || !organizador[playerid] || pAdmin[playerid] == 5)return SendClientMessage(playerid,0xFF0000FF,"| INFO | Apenas Organizadores de Evento e Admins Pode Usar Esse Comando");
tmp = strtok(cmdtext, idx);
SendClientMessage(playerid,0x0DBCDBFF,"Comandos: /criarevento /destrancarevento /trancarevento /carroevento /armarevento /fecharevento");
SendClientMessage(playerid,0x0DBCDBFF,"Comandos: /kickevento/sairdoevento");
return 1;
}
And here is the other command
Код HTML:
if(!strcmp(cmd,"/criarevento",true))
{
if(!IsPlayerAdmin(playerid) || !organizador[playerid] || pAdmin[playerid] == 5)return SendClientMessage(playerid,0xFF0000FF,"| INFO |: Apenas Organizadores de Evento e Admins Podem Usar Esse comando ");
tmp = strtok(cmdtext, idx);
if(EventoInfo[Criado] == 1)return SendClientMessage(playerid,0xFF0000FF,"| ERRO | Jб Existe Um evento Criado Feche Para que Posso criar um novo evento.");
format(string, sizeof(string), "( INFO-EVENTO ) O(a) Jogador(a) %s Criou um evento", PlayerName(playerid));
SendClientMessageToAll(0x0BFBFBFF, string);
GetPlayerPos(playerid,POS[0],POS[1],POS[2]); GetPlayerFacingAngle(playerid,POS[3]);
EventoInfo[P1] = Float:POS[0];
EventoInfo[P2] = Float:POS[1];
EventoInfo[P3] = Float:POS[2];
EventoInfo[P4] = Float:POS[3];
EventoInfo[Interior] = GetPlayerInterior(playerid);
EventoInfo[Mundo] = GetPlayerVirtualWorld(playerid);
InEvento[playerid] = 1;
for(new i,k=13; i != k; ++i)
{
GetPlayerWeaponData(playerid,i,EventoInfo[Arma][i],EventoInfo[Balas][i]);
}
if(IsPlayerInAnyVehicle(playerid))
{
EventoInfo[Carro] = GetVehicleModel(GetPlayerVehicleID(playerid));
}
EventoInfo[Criado] = 1;
EventoInfo[Aberto] = 0;
SendClientMessage(playerid,0x29A8E8FF,"| INFO | Evento Criado Com Sucesso Para Abrir Use O Comando: /destrancarevento");
return 1;
}
Re: Error, Someone help me? -
Swedky - 15.12.2016
Try this:
PHP код:
if(!(IsPlayerAdmin(playerid) && organizador[playerid] && pAdmin[playerid] == 5)) // ...