[AJUDA]Ajuda aqui por favor
#1

Eu baixei uma fs de evento do airton porque o que tenho na minha que fiz nгo ta la essas coisas sу que a dele й boa sу que bugo nao ta pegando nenhum comando nenhum mesmo ta ai a fs dele





PHP код:
#include <a_samp>
     
    #define COR_VERMELHA 0xF66767AA
    #define COR_BRANCO   0xFFFFFFAA
    #define COR_AZUL     0x447FECAA
    
enum EventoSystem
    
{
            
bool:Eventoiniciado,//bool irб indicar sim ou nгo (false or true) melhor doque 0 ou 1
            
bool:Eventotrancado,
            
bool:Eventodestrancado,
            
bool:Entrar,
            
bool:Eventocontagem,
    };
    new 
Airton[MAX_PLAYERS][EventoSystem];
    new 
Float:ex,Float:ey,Float:ez;
    new 
Float:entroux,Float:entrouy,Float:entrouz;
    new 
entraram;
    new 
CountDown = -1;
    
forward countdown();
     
    public 
OnFilterScriptInit()
    {
            print(
"--**Evento System Iniciado com sucesso**--");
            print(
"--**Desenvolvido para o SA-MP 0.3b RC2**--");
            print(
"--**Progamado por Airton.Vitor**--");
            
SendClientMessageToAll(COR_VERMELHA,"Evento System Iniciado com sucesso by Airton");
            return 
1;
    }
     
    public 
OnFilterScriptExit()
    {
            print(
"--**Evento System Finalizado com sucesso**--");
            
SendClientMessageToAll(COR_AZUL,"-**Evento System Finalizado com sucesso by Airton");
            return 
1;
    }
     
    
main(){}
     
    public 
OnPlayerConnect(playerid)
    {
        
Airton[playerid][Eventoiniciado] = false;
        
Airton[playerid][Eventodestrancado] = false;
        
Airton[playerid][Eventotrancado] = false;
        
Airton[playerid][Entrar] = false;
            return 
1;
    }
     
    public 
OnPlayerSpawn(playerid)
    {
            if(
IsPlayerAdmin(playerid))
            {
                    
SendClientMessage(playeridCOR_AZUL"[EVENTOS]: Uso> /evento para ver os comandos disponiveis");
            }
            return 
1;
    }
    public 
OnPlayerDeath(playeridkilleridreason)
    {
        
Airton[playerid][Entrar] = false;
            return 
1;
    }
     
    public 
OnPlayerCommandText(playeridcmdtext[])
    {
        new 
cmd[128]; new streventu[128]; new idcmd;
        new 
admnick[20];
        
cmd strtok(cmdtextidcmd);
        if(
strcmp(cmd"/evento"true) == 0&&IsPlayerAdmin(playerid))
            {
            
SendClientMessage(playeridCOR_BRANCO"===============================================================================");
            
SendClientMessage(playeridCOR_VERMELHA"=========================EVENTO SYSTEM COMANDOS DНSPONIVEIS====================");
                    
SendClientMessage(playeridCOR_AZUL"[EVENTOS]: /einiciar,/edestrancar,/etrancar,/edestrancar,/eventoterminar,/ekick");
            
SendClientMessage(playeridCOR_AZUL"[EVENTOS]: /ecarro,/evida,/earma,/ecolete,/econtar,/econgelar,/edescongelar    ");
            
SendClientMessage(playeridCOR_BRANCO"===============================================================================");
            return 
1;
            }
        if(
strcmp(cmd"/einiciar"true) == 0&&Airton[playerid][Eventoiniciado] == false &&IsPlayerAdmin(playerid))
            {
                    
GetPlayerPos(playeridexeyez);
            
SendClientMessageToAll(COR_AZUL"-INFO- Um evento acaba de ser iniciado! Digite /entrar para se teleportar atй o evento");
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(IsPlayerConnected(possiveis))
            {
                    
GameTextForPlayer(possiveis,"~y~novo evento aberto ~n~digite ~b~/entrar"22001);
                    
Airton[possiveis][Eventoiniciado] = true;
                    
Airton[possiveis][Eventotrancado] = false;
                    
Airton[possiveis][Eventodestrancado] = false;
                    
Airton[playerid][Entrar] = false;
            }
            return 
1;
            }
        if(
strcmp(cmd"/etrancar"true) == 0&&Airton[playerid][Eventoiniciado] == true&&Airton[playerid][Eventotrancado] == false &&IsPlayerAdmin(playerid))
            {
            
SendClientMessageToAll(COR_BRANCO"===============================================================================");
            
format(streventu128"-INFO- O evento foi trancado - %d jogadores(ras) entrarao"entraram);
            
SendClientMessageToAll(COR_AZULstreventu);
            
SendClientMessageToAll(COR_BRANCO"===============================================================================");
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(IsPlayerConnected(possiveis))
            {
                    
GameTextForPlayer(possiveis,"~y~evento ~r~fechado"25001);
                    
Airton[possiveis][Eventotrancado] = true;
                    
Airton[possiveis][Eventodestrancado] = true;
            }
            return 
1;
            }
        if(
strcmp(cmd"/edestrancar"true) == 0&&Airton[playerid][Eventoiniciado] == true &&Airton[playerid][Eventodestrancado] == true&&IsPlayerAdmin(playerid))
            {
            
SendClientMessageToAll(COR_BRANCO"===============================================================================");
            
SendClientMessageToAll(COR_AZUL"-INFO- O evento foi destrancado! Digite /entrar");
            
SendClientMessageToAll(COR_BRANCO"===============================================================================");
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(IsPlayerConnected(possiveis))
            {
                    
GameTextForPlayer(possiveis,"~w~evento ~g~aberto"25001);
                    
Airton[possiveis][Eventotrancado] = false;
                    
Airton[possiveis][Eventodestrancado] = false;
            }
            return 
1;
            }
        if(
strcmp(cmd"/efinalizar"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
            
GetPlayerName(playerid,admnick24);
            
SendClientMessageToAll(COR_BRANCO"===============================================================================");
            
format(streventu128"-INFO- O Administrador RCON %s evento foi finalizado!"admnick);
            
SendClientMessageToAll(COR_AZULstreventu);
            
SendClientMessageToAll(COR_BRANCO"===============================================================================");
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(IsPlayerConnected(possiveis))
            {
                    
GameTextForPlayer(possiveis,"~w~evento ~r~finalizado"25001);
                    
Airton[possiveis][Eventotrancado] = false;
                    
Airton[possiveis][Eventoiniciado] = false;
                    
Airton[possiveis][Eventodestrancado] = false;
            }
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
            {
                    
Airton[possiveis][Entrar] = false;
                    
SetPlayerPos(playeridentrouxentrouyentrouz);
            }
            return 
1;
            }
        if(
strcmp(cmd"/entrar"true) == 0&&Airton[playerid][Entrar] == false&&Airton[playerid][Eventoiniciado] == true &&Airton[playerid][Eventotrancado] == false&&IsPlayerAdmin(playerid))
            {
            
Airton[playerid][Entrar] = true;
            
entraram++;
            
GetPlayerPos(playeridentrouxentrouyentrouz);
                    
SetPlayerPos(playeridexeyez);
            return 
1;
            }
        if(
strcmp(cmd"/esair"true) == 0&&Airton[playerid][Entrar] == true&&Airton[playerid][Eventoiniciado] == true &&Airton[playerid][Eventotrancado] == false&&IsPlayerAdmin(playerid))
            {
            
Airton[playerid][Entrar] = false;
            
entraram--;
                    
SetPlayerPos(playeridentrouxentrouyentrouz);
            return 
1;
            }
        if(
strcmp(cmd"/edesarmar"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
                {
                    
ResetPlayerWeapons(possiveis);
                    
SetPlayerArmedWeapon(possiveis,0);
                    }
            
GetPlayerName(playerid,admnick24);
            
format(streventu128"-INFO- O Administrador RCON %s desarmou todos jogadores do evento!"admnick);
            
SendClientMessageToAll(COR_AZULstreventu);
                    return 
1;
            }
        if(
strcmp(cmd"/ekick"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
                new 
tmp[128];
            new 
id strval(tmp);
                    
tmp strtok(cmdtextidcmd);
                    if(!
strlen(tmp))
                    {
                    
SendClientMessage(playeridCOR_AZUL"Digite: /ekick [id]");
                    return 
1;
                    }
            if(
Airton[id][Entrar] == true)
                {
                    
ResetPlayerWeapons(id);
                    
SetPlayerPos(identrouxentrouyentrouz);
                    
Airton[id][Entrar] = false;
                    new 
jogadornick[24];
                    
GetPlayerName(playerid,admnick24);
                    
GetPlayerName(id,jogadornick24);
                    
format(streventu128"-INFO- O Administrador RCON %s kickou jogador %s do evento!"admnick,jogadornick);
                    
SendClientMessageToAll(COR_AZULstreventu);
                    }
                    else if(
Airton[id][Entrar] == true)
                    {
                    
SendClientMessage(playeridCOR_AZUL"O jogador selecionado nгo encontra-se no evento!");
                    }
                    return 
1;
            }
        if(
strcmp(cmd"/earma"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
                    new 
gun;
                    new 
ammo;
                    new 
tmp[128];
                    
tmp strtok(cmdtextidcmd);
                    
gun strval(tmp);
                    if(!
strlen(tmp))
                    {
                    
SendClientMessage(playeridCOR_BRANCO"Digite o id da arma e a muniзгo!");
                    return 
1;
                    }
                    
tmp strtok(cmdtextidcmd);
                    
ammo strval(tmp);
                    
/*if(ammo < 1||ammo > 9999)
                    {
                            return 1;
                    }*/
            
for(new possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
                {
                            
GivePlayerWeapon(possiveisgunammo);
                    }
            
GetPlayerName(playerid,admnick24);
            
format(streventu128"-INFO- O Administrador RCON %s deu arma %d muniзгo %d aos jogadores do evento!"admnick,gun,ammo);
            
SendClientMessageToAll(COR_AZULstreventu);
                    return 
1;
            }
        if(
strcmp(cmd"/ecarro"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
            new 
tmp[128];
            
tmp strtok(cmdtextidcmd);
                    new 
carro;
                    
carro strval(tmp);
                    if(!
strlen(tmp))
                    {
                    
SendClientMessage(playeridCOR_BRANCO"Digite o id do carro!");
                    return 
1;
                    }
                    if(
carro 400 || carro 611)
                    {
                    
SendClientMessage(playeridCOR_VERMELHA"   O ID do veiculo digitado estб invalido! veiculos de 400 б 611");
                            return 
1;
                    }
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
                {
                            new 
Float:0,Float:0,Float:0,Float:Angulo 0;
                            
GetPlayerPos(possiveisX,Y,Z);
                            
GetPlayerFacingAngle(playeridAngulo);
                    
//CreateVehicle(car, X, Y, Z, Angulo, 1, 1, 10000);//cria um veiculo bem no player
                    
PutPlayerInVehicle(possiveisCreateVehicle(carroX,Y,ZAngulo11,10000), 0);//coloca o player num veiculo
                    
}
                    
GetPlayerName(playerid,admnick24);
            
format(streventu128"-INFO- O Administrador RCON %s deu veiculo %d aos jogadores do evento!"admnick,carro);
            
SendClientMessageToAll(COR_AZULstreventu);
                    return 
1;
            }
        if(
strcmp(cmd"/econtar"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
            if(
CountDown == -1)
                    {
                            
CountDown 6;
                            
SetTimer("countdown",1000,0);
                    
GetPlayerName(playerid,admnick24);
                    
format(streventu128"-INFO- O Administrador RCON %s iniciou a contagem do evento!"admnick);
                    
SendClientMessageToAll(COR_AZULstreventu);
                    }
                    return 
1;
            }
        if(
strcmp(cmd"/econgelar"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
                {
                    
TogglePlayerControllable(possiveisfalse);
                    }
            
GetPlayerName(playerid,admnick24);
            
format(streventu128"-INFO- O Administrador RCON %s congelou os jogadores do evento!"admnick);
            
SendClientMessageToAll(COR_AZULstreventu);
                    return 
1;
            }
        if(
strcmp(cmd"/edescongelar"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
            for(new 
possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
                {
                    
TogglePlayerControllable(possiveistrue);
                    }
            
GetPlayerName(playerid,admnick24);
            
format(streventu128"-INFO- O Administrador RCON %s descongelou os jogadores do evento!"admnick);
            
SendClientMessageToAll(COR_AZULstreventu);
                    return 
1;
            }
        if(
strcmp(cmd"/evida"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
                    new 
tmp[128];
            
tmp strtok(cmdtextidcmd);
            new 
vida strval(tmp);
            if(!
strlen(tmp))
                    {
                    
SendClientMessage(playeridCOR_BRANCO"Digite a quantidade do HP!");
                            return 
1;
                    }
            
/*if(vida < 1 || vida > 9999)
            {
                            return 1;
                    }*/
            
for(new possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
                {
                    
SetPlayerHealth(possiveis,vida);
                    }
            
GetPlayerName(playerid,admnick24);
            
format(streventu128"-INFO- O Administrador RCON %s setou HP %d para os jogadores do evento"admnick,vida);
            
SendClientMessageToAll(COR_AZULstreventu);
                    return 
1;
            }
        if(
strcmp(cmd"/ecolete"true) == 0&&Airton[playerid][Eventoiniciado] == true &&IsPlayerAdmin(playerid))
            {
                    new 
tmp[128];
            
tmp strtok(cmdtextidcmd);
            new 
colete strval(tmp);
            if(!
strlen(tmp))
                    {
                    
SendClientMessage(playeridCOR_BRANCO"Digite a quantidade do Colete!");
                            return 
1;
                    }
            
/*if(colete < 1 || colete > 9999)
                    {
                            return 1;
                    }*/
            
for(new possiveis 0possiveis MAX_PLAYERSpossiveis++) if(Airton[playerid][Entrar] == true)
                {
                    
SetPlayerArmour(possiveiscolete);
                    }
            
GetPlayerName(playerid,admnick24);
            
format(streventu128"-INFO- O Administrador RCON %s setou Colete %d para os jogadores do evento"admnickcolete);
            
SendClientMessageToAll(COR_AZULstreventu);
                    return 
1;
            }
            return 
1;
    }
     
    public 
countdown()
    {
            if(
CountDown==6GameTextForAll("~p~Starting...",1000,6);
     
            
CountDown--;
            if(
CountDown==0)
            {
                    
GameTextForAll("~g~GO~ r~!",1000,6);
                    
CountDown = -1;
                    for(new 
0MAX_PLAYERSi++) {
                            
TogglePlayerControllable(i,true);
                            
PlayerPlaySound(i10570.00.00.0);
                    }
                    return 
0;
            }
            else
            {
                    new 
text[7]; format(text,sizeof(text),"~w~%d",CountDown);
                    for(new 
0MAX_PLAYERSi++) {
                            
PlayerPlaySound(i10560.00.00.0);
                            
TogglePlayerControllable(i,false);
                    }
                    
GameTextForAll(text,1000,6);
            }
     
            
SetTimer("countdown",1000,0);
            return 
0;
    }
    
/*
     
            Discriзгo: Sistema de eventos v0.2c
            Progamado por: Airton.Vitor
            Manual: Para criar,trancar,setar,etc vocк deve estar logado como Administrador RCON
            Dica: /rcon login [suasenha]
            Lembrete: Sejб um bom menino e mantenha os crйditos :p
     
    */
    
strtok(const string[], &index)
    {
            new 
length strlen(string);
            while ((
index length) && (string[index] <= ' '))
            {
                    
index++;
            }
     
            new 
offset index;
            new 
result[20];
            while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
            {
                    
result[index offset] = string[index];
                    
index++;
            }
            
result[index offset] = EOS;
            return 
result;
    } 

Sу quero saber porque ele nao ta pegando nenhum comando D: porque esse sistema de evento ta maneiro se alguem tiver um que tenha esses comandos pode me passar por favor ?
Reply
#2

ja compilasse para ver se da erro?
Reply
#3

Ja nao da erro mais tb nao vai nenhum cmd D: vc tem algum sistema de evento to precisando de um urgente meu sv ta crescendo mais nao tem evento nem nada pra divertir D:
Reply
#4

http://forum.sa-mp.com/showthread.ph...ghlight=Evento
Reply
#5

esse eu sei qual й ele tem alguns cmd bugado tipo de dar arma '-' e mais 2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)