SA-MP Forums Archive
[Ajuda] Script banindo ao entrar em um veнculo - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Script banindo ao entrar em um veнculo (/showthread.php?tid=600711)



Script banindo ao entrar em um veнculo - best95 - 12.02.2016

quando alguem pega um carro ou moto no server ele e banido mais ele reloga e entra normal... oque sera? deixo o comando de criar veiculos ve se alguem sabe o porque.

CODIGO:


pawn Код:
CMD:car(playerid, params[])
{
    new Veiculo[25];
    if(sscanf(params, "s[25]",Veiculo)) return Msg(playerid, Vermelho, "[x]: {FFFFFF}Uso Correto: {FF0000}/Car [id/nome] ");
    new bool:existe, VeiculoID;
    if(!IsNumeric(Veiculo))
    {
        for(new r = 0;r < 212; r++)
        {
            if(!strcmp(Veiculo, ListaCarros[r],true))
            {
                existe = true;
            }
            if(!strcmp(Veiculo,ListaCarros[r],true)) VeiculoID = (r+400);
        }
    }
    if(IsNumeric(Veiculo))
    {
        VeiculoID = strval(Veiculo);
        existe = true;
        if(400 < (VeiculoID) > 611) existe = false;
    }
    if(!existe)
        {
            format(String, sizeof(String), "{1E90FF}Lista Carros:  {FFFFFF}O Veнculo %s nгo existe em nossa lista.", Veiculo);
            Msg(playerid, cortag, String);
            return 1;
        }

    if(VeiculoID == 520 || VeiculoID == 432 || VeiculoID == 592 || VeiculoID == 425 || VeiculoID == 464 || VeiculoID == 476 || VeiculoID == 447)
    {
        if(GetPlayerVirtualWorld(playerid) != 5) return Msg(playerid, Vermelho, "Somente no Mundo Mata-Mata");
    }
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Angle);
    CreateVehicleEx(playerid, VeiculoID, X,Y,Z+1, Angle, 152, 1, -1);
    format(String, sizeof(String), "{1E90FF}Veiculo: {FFFFFF}Veнculo [%s] criado!", ListaCarros[VeiculoID-400]);
    Msg(playerid, cortag, String);
    LigarCarro(playerid);
    return 1;
}



Re: GM BANI QUANDO PEGA CARRO - zSuYaNw - 12.02.2016

to й querendo te banir da vida depois de ver este seu cуdigo.

Tente isso:
PHP код:
CMD:car(playeridparams[])
{
    static
        
Floatx,
        
Floaty,
        
Floatz,
        
Floata
    
;
    
GetPlayerPos(playeridxy,z);
    
GetPlayerFacingAngle(playerida);
    
    
    
    
    if(!
IsNumeric(params[0])){
        static 
_f;
        for(
_f 0_f != sizeof(ListaCarros); ++_f){
            if(
strfind(ListaCarros[_f], params[0], trye) != -1){
                
CreateVehicleEx(playerid_f 400x,y,z+1a1521, -1);
                break;
            }
        }
        
format(Stringsizeof(String), "{1E90FF}Veiculo: {FFFFFF}Veнculo [%s] criado!"ListaCarros[_f 400]);
        return 
Msg(playeridcortagString), true;
    }else{
        static
            
VeiculoID
        
;
        
        
VeiculoID strval(params[0]);
        
        if(
400 < (VeiculoID) > 611){
            
format(Stringsizeof(String), "{1E90FF}Lista Carros:  {FFFFFF}O Veнculo %s nгo existe em nossa lista."VeiculoID);
            return 
Msg(playeridcortagString);
        }
        
        
CreateVehicleEx(playeridVeiculoID 400x,y,z+1a1521, -1);
        
          
format(Stringsizeof(String), "{1E90FF}Veiculo: {FFFFFF}Veнculo [%s] criado!"ListaCarros[VeiculoID 400]);
          
Msg(playeridcortagString);
    }
    
    
LigarCarro(playerid);
    return 
true;

Se nгo der certo, verifique seu sistema Anti Hack.


Re: GM BANI QUANDO PEGA CARRO - best95 - 16.02.2016

Mano de isso aqui....nгo mechi pq n quero estragar o codigo.. vlw

pawn Код:
C:\Users\Gabriel\Desktop\zp new\gamemodes\GM.pwn(4415) : error 017: undefined symbol "trye"
C:\Users\Gabriel\Desktop\zp new\gamemodes\GM.pwn(4440) : warning 217: loose indentation
C:\Users\Gabriel\Desktop\zp new\gamemodes\GM.pwn(9184) : warning 203: symbol is never used: "Angle"



Re: GM BANI QUANDO PEGA CARRO - Whoo - 16.02.2016

Quote:
Originally Posted by best95
Посмотреть сообщение
Mano de isso aqui....nгo mechi pq n quero estragar o codigo.. vlw

pawn Код:
C:\Users\Gabriel\Desktop\zp new\gamemodes\GM.pwn(4415) : error 017: undefined symbol "trye"
C:\Users\Gabriel\Desktop\zp new\gamemodes\GM.pwn(4440) : warning 217: loose indentation
C:\Users\Gabriel\Desktop\zp new\gamemodes\GM.pwn(9184) : warning 203: symbol is never used: "Angle"
1 erro no lugar de trye coloque true...
Код:
C:\Users\Gabriel\Desktop\zp new\gamemodes\GM.pwn(4415) : error 017: undefined symbol "trye"
2 erro й identaзгo idente o codigo
3 erro diz que a variбvelou Angle nгo esta sendo usada


Re: GM BANI QUANDO PEGA CARRO - best95 - 16.02.2016

beleza porem quando eu pego o carro.. ele funciona mais no chat apareзe /car elegy nгo existe um exemplo.. da a frase de erro mesmo funcionando.


Re: Script banindo ao entrar em um veнculo - best95 - 16.02.2016

pawn Код:
CMD:car(playerid, params[]) {


    static
    Float: x,
    Float: y,
    Float: z,
    Float: a;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, a);




    if (!IsNumeric(params[0])) {


        static _f;
        for (_f = 0; _f != sizeof(ListaCarros); ++_f) {
            if (strfind(ListaCarros[_f], params[0], true) != -1) {
                CreateVehicleEx(playerid, _f + 400, x, y, z + 1, a, 152, 1, -1);
                break;
            }
        }


        format(String, sizeof(String), "{1E90FF}Veiculo: {FFFFFF}Veнculo [%s] criado!", ListaCarros[_f - 400]);
        return Msg(playerid, cortag, String), true;
    } else {
        static
        VeiculoID;

        VeiculoID = strval(params[0]);

        if (400 < (VeiculoID) > 611) {
            format(String, sizeof(String), "{1E90FF}Lista Carros:  {FFFFFF}O Veнculo %s nгo existe em nossa lista.", VeiculoID);
            return Msg(playerid, cortag, String);
        }


        CreateVehicleEx(playerid, VeiculoID + 400, x, y, z + 1, a, 152, 1, -1);

        format(String, sizeof(String), "{1E90FF}Veiculo: {FFFFFF}Veнculo [%s] criado!", ListaCarros[VeiculoID - 400]);
        Msg(playerid, cortag, String);
    }

    LigarCarro(playerid);
    return true;
}