SA-MP Forums Archive
[Ajuda]Como Arrumar isso?? - 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]Como Arrumar isso?? (/showthread.php?tid=354073)



[Ajuda]Como Arrumar isso?? - [BD]Cachorro_[BD] - 25.06.2012

To precisando de ajuda ja tentei mudar isto para fs e nao consegui e tmb ja tentei arrumar os erros q tem mas nao da certo!!! Alguem pode me Ajudar ou arrumar pra mim to precisando mto e nao to conseguindo!!!

pawn Код:
/*
>>>>>>>>>>>>>>>>>>>> Como adicionar Veiculos para venda no FilterScripts

- > Primeiro :

Adicionar no InfoVenda um valor atribuido ao Veiculo
 Exemplo :
 ID | Preзo
 \/    \/
{455,500000}

- > Segundo :

No 'CarrosConcessionaria' , adicione um numero a mais e crie-o no 'OnGameModeInit'
Para tranca-lo vб em OnPlayerConnect e vocк aprenderб rapidamente.

- > Terзeiro :
Adicionar no 'ShowPlayerDialog' do '/comprarcarro' o nome do veiculo.
Exemplo
'\nFlatbed\n'

- > Quarto e Ultimo :
Na Public de forзar o valor do veiculo. Adicione um novo 'case' para forзar e mostrar no dialog o valor do veiculo.
 Exemplo :
 case: 455 = InfoVenda [ playerid ] [ PrecoCarro ] = 250000 ;
O numero ao lado do 'case' , significa o ID do veiculo.
O '250000' й o preзo do veiculo.

 -------------------- Seguindo essas instruзхes , vocк conseguirб fazer um veiculo a venda sem Bugґs !

>>>>>>>>>>>>>>>>>>>>> Comandos do FilterScript :

/comprarcarro
/vendercarro
/estacionar
/localizarcarro
/pintar



>>>>>>>>>>>>>>>>>>>>>>>>>>>> Crйditos :
                            []BlackGangsta[] - Idealizador e Criador
                            Josma_CMD - Ajudante - Ajudou em varias coisas no Game Mode
                            Nгo sei se os Crйditos sгo verdadeiros peguei aki no forum!!!


*/

#include < a_samp >
#include < Dini >

enum iCarro
{
    s_Dono[ 24 ],
    s_Modelo,
    Float:s_PosX,
    Float:s_PosY,
    Float:s_PosZ,
    Float:s_PosA,
    s_Cor1,
    s_Cor2,
    s_Respawn
};
new
    InfoCarro [ MAX_PLAYERS ] [ iCarro ] ,
    CarroConcessionaria [ 4 ] ,
    CarroJogador [ MAX_PLAYERS ] ,
    String [ 128 ] ,
    Checkpoint [ MAX_PLAYERS ] ,
    ModeloIDCarro [ MAX_PLAYERS ]
    ;

enum iVenda {ModeloCarro,PrecoCarro};
new
    InfoVenda[4][iVenda] =
{  //Modelo, Nome, Preco
    {411,500000}, // Infernus = 500.000
    {522,100000}, // NRG-500 = 100.000
    {451,450000}, // Turismo = 450.000
    {415,200000} // Cheetah = 200.000
};

public
    OnVehicleSpawn ( vehicleid )
{
    for(new i ; i < MAX_PLAYERS ; ++i)
    {
            format ( String , 30 , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( i ) ) ;
            if ( fexist ( String ) )
            {
                if ( dini_Int ( String , "Estacionado" ) == 10 )
                {
                    SetVehiclePos ( vehicleid , dini_Int ( String , "PosX" ) , dini_Int ( String , "PosY" ) , dini_Int ( String , "PosZ" ) ) ;
                }
            }
        }
    return true ;
}

public
    OnGameModeInit ( )
    {

    CarroConcessionaria [ 0 ] = CreateVehicle ( 411 , 2149.5 , -1134.0 , 25.4 , 270.15 , 1 , 1 , 50000 ) ;
    CarroConcessionaria [ 1 ] = CreateVehicle ( 522 , 2149.126220 , -1136.827514 , 25.151468 , 270.144958 , 1 , 1 , 50000 ) ;
    CarroConcessionaria [ 2 ] = CreateVehicle ( 451 , 2148.9966 , -1139.7101 , 24.9981 , 269.0601 , 1 , 1 , 50000 ) ;
    CarroConcessionaria [ 3 ] = CreateVehicle ( 415 , 2148.3689 , -1145.4435 , 24.3671 , 271.1245 , 1 , 1 , 50000 ) ;

    return true;
}

public
    OnGameModeExit ( )
    {
    SetTimer ( "GameModeExitFunc" , 2000 , 0 ) ;
    return true ;
}

public
    OnPlayerConnect ( playerid )
    {
        new
             iEngine , iEngine2 , iEngine3 , iEngine4 ,
             iLights , iLights2 , iLights3 , iLights4 ,
             iAlarm , iAlarm2 , iAlarm3 , iAlarm4 ,
             iDoors , iDoors2 , iDoors3 , iDoors4 ,
             iBonnet , iBonnet2 , iBonnet3 , iBonnet4 ,
             iBoot , iBoot2 , iBoot3 , iBoot4 ,
             iObjective , iObjective2 , iObjective3 , iObjective4
         ;

        GetVehicleParamsEx ( CarroConcessionaria [ 0 ] , iEngine , iLights , iAlarm , iDoors , iBonnet , iBoot , iObjective ) ;
        SetVehicleParamsEx ( CarroConcessionaria [ 0 ] , false , false , false , false , false , false , 0 ) ;

        GetVehicleParamsEx ( CarroConcessionaria [ 1 ] , iEngine2 , iLights2 , iAlarm2 , iDoors2 , iBonnet2 , iBoot2 , iObjective2 ) ;
        SetVehicleParamsEx ( CarroConcessionaria [ 1 ] , false , false , false , false , false , false , 0 ) ;

        GetVehicleParamsEx ( CarroConcessionaria [ 2 ] , iEngine3 , iLights3 , iAlarm3 , iDoors3 , iBonnet3 , iBoot3 , iObjective3 ) ;
        SetVehicleParamsEx ( CarroConcessionaria [ 2 ] , false , false , false , false , false , false , 0 ) ;

        GetVehicleParamsEx ( CarroConcessionaria [ 3 ] , iEngine4 , iLights4 , iAlarm4 , iDoors4 , iBonnet4 , iBoot4 , iObjective4 ) ;
        SetVehicleParamsEx ( CarroConcessionaria [ 3 ] , false , false , false , false , false , false , 0 ) ;

        format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
        if ( dini_Exists ( String ) )
        {
            InfoCarro[ playerid ] [ s_Dono ] = dini_Int ( String , "DonoCarro" ) ;
            InfoVenda[ playerid ] [ ModeloCarro ] = dini_Int ( String , "Modelo" ) ;
            InfoCarro[ playerid ] [ s_PosX ] = dini_Float ( String , "PosX" ) ;
            InfoCarro[ playerid ] [ s_PosY ] = dini_Float ( String , "PosY" ) ;
            InfoCarro[ playerid ] [ s_PosZ ] = dini_Float ( String , "PosZ" ) ;
            InfoCarro[ playerid ] [ s_PosA ] = dini_Float ( String , "Angulo" ) ;
            InfoCarro[ playerid ] [ s_Cor1 ] = dini_Int ( String , "Cor1" ) ;
            InfoCarro[ playerid ] [ s_Cor2 ] = dini_Int ( String , "Cor2" ) ;
            InfoCarro[ playerid ] [ s_Respawn ] = dini_Int ( String , "Respawn" ) ;
            CarroJogador [ playerid ] = CreateVehicle ( InfoVenda[ playerid ] [ ModeloCarro ] , InfoCarro[ playerid ] [ s_PosX ] , InfoCarro[ playerid ] [ s_PosY ] , InfoCarro[ playerid ] [ s_PosZ ] , InfoCarro[ playerid ] [ s_PosA ] , InfoCarro[ playerid ] [ s_Cor1 ] , InfoCarro[ playerid ] [ s_Cor2 ] , InfoCarro[ playerid ] [ s_Respawn ] ) ;
        }
        return true ;
}

public
    OnPlayerSpawn ( playerid )
        return SetPlayerPos ( playerid , 1691.1439 , 1430.6595 , 10.7658 ) ;

public
    OnPlayerDisconnect ( playerid , reason )
    {
        format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
        if ( dini_Exists ( String ) )
        {
            dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
            dini_IntSet ( String , "Modelo" , InfoVenda [ playerid ] [ ModeloCarro ] ) ;
            dini_FloatSet ( String , "PosX" , InfoCarro [ playerid ] [ s_PosX ] ) ;
            dini_FloatSet ( String , "PosY" , InfoCarro [ playerid ] [ s_PosY ] ) ;
            dini_FloatSet ( String , "PosZ" , InfoCarro [ playerid ] [ s_PosZ ] ) ;
            dini_FloatSet ( String , "Angulo" , InfoCarro [ playerid ] [ s_PosA ] ) ;
            dini_IntSet ( String , "Cor1" , 1 ) ;
            dini_IntSet ( String , "Cor2" , 1 ) ;
            dini_IntSet ( String , "Respawn" , -1 ) ;
            DestroyVehicle ( CarroJogador [ playerid ] ) ;
        }
        return true ;
}

public
    OnPlayerEnterCheckpoint ( playerid )
{
    if ( Checkpoint [ playerid ] == 1 )
    {
        PlayerPlaySound ( playerid , 1149 , 0.0 , 0.0 , 0.0 ) ;
        SendClientMessage ( playerid , -1 , "Seja Bem Vindo ao seu veiculo !" ) ;
        DisablePlayerCheckpoint ( playerid ) ;
        return true;
    }
    return true;
}

public
    OnPlayerCommandText ( playerid , cmdtext[] )
{
    new
        cmd [ 128 ] ,
        tmp [ 128 ] ,
        tmp2 ,
        idx,
        msg [ 128 ]
    ;

    cmd = strtok ( cmdtext , idx ) ;
    tmp = strtok ( cmdtext , idx ) ;
    tmp2 = strval ( tmp ) ;

    format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;

    if ( strcmp ( "/comprarcarro" , cmdtext ) == 0 )
    {
        if ( dini_Exists ( String ) )
            return SendClientMessage ( playerid , -1 , "Vocк jб possui um veiculo !" ) ;

        ShowPlayerDialog ( playerid , 120+120, DIALOG_STYLE_LIST, "Compra de Veiculos","Infernus\nNRG-500\nTurismo\nCheetah","Certo","Cancelar");
        return true;
    }

    if ( strcmp ("/vendercarro" , cmdtext ) == 0 )
    {
        if (! dini_Exists ( String ) )
            return SendClientMessage ( playerid , -1 , "Vocк nгo possui um veiculo !" ) ;

        if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
            return SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб em seu veiculo." ) ;


        format(msg, sizeof(msg), "Vocк vendeu seu carro por um valor 50 por cento, para $ %i.",  InfoVenda [ playerid ] [ PrecoCarro ] / 2 ) ;
        GivePlayerMoney ( playerid ,  InfoVenda [ playerid ] [ PrecoCarro ] / 2 ) ;
        DestroyVehicle ( CarroJogador [ playerid ] ) ;
        dini_Remove ( String ) ;
        CarroJogador [ playerid ] = 0 ;
        InfoVenda [ playerid ] [ ModeloCarro ] = 0 ;
        InfoVenda [ playerid ] [ PrecoCarro ] = 0 ;
        InfoCarro [ playerid ] [ s_PosX ] = 0 ;
        InfoCarro [ playerid ] [ s_PosY ] = 0 ;
        InfoCarro [ playerid ] [ s_PosZ ] = 0 ;
        InfoCarro [ playerid ] [ s_PosA ] = 0 ;
        SendClientMessage ( playerid , 0xFFFF00FF , msg ) ;
        return 1;
    }

    if ( strcmp ( "/estacionar" , cmdtext ) == 0 )
    {
        if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
                return  SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб no seu veiculo." ) ;

        AtualizarPos ( ) ;

        InfoVenda [ playerid ] [ ModeloCarro ] = GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) ;
        InfoCarro [ playerid ] [ s_PosX ] = GetPVarFloat ( playerid , "PosX" ) ;
        InfoCarro [ playerid ] [ s_PosY ] = GetPVarFloat ( playerid , "PosY" ) ;
        InfoCarro [ playerid ] [ s_PosZ ] = GetPVarFloat ( playerid , "PosZ" ) ;
        InfoCarro [ playerid ] [ s_PosA ] = GetPVarFloat ( playerid , "PosA" ) ;

        printf ( "PosX: %f, PosY: %f, PosZ: %f, PosA: %f" , GetPVarFloat ( playerid , "PosX" ) , GetPVarFloat ( playerid , "PosY" ) , GetPVarFloat ( playerid , "PosZ" ) , GetPVarFloat ( playerid , "PosA" ) ) ;


        SendClientMessage ( playerid , 0xFFFF00FF , "Carro estacionado com sucesso !" ) ;
        return true;
    }

    if ( strcmp ( "/localizarcarro" , cmdtext ) == 0 )
    {
        new
            Float:vx ,
            Float:vy ,
            Float:vz
        ;

        GetVehiclePos ( CarroJogador [ playerid ] , vx , vy , vz ) ;
        SetPlayerCheckpoint ( playerid , vx , vy , vz , 10.0 ) ;
        Checkpoint [ playerid ] = 1 ;
        SendClientMessage ( playerid , 0xFFFFFFAA , "Vб ate o Checkpoint para Localizar o seu carro !" ) ;
        return true;
    }

    if ( strcmp ( cmd , "/pintar" , true ) == 0 )
    {
            if ( ! dini_Exists ( String ) )
                return SendClientMessage ( playerid , -1 , "Vocк nгo possui um veiculo !" ) ;

            if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
                return  SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб no seu veiculo." ) ;

            if ( ! strlen ( tmp ) )
                return SendClientMessage ( playerid , -1 , "Use /pintar [ Cor ]" ) ;

            ChangeVehicleColor ( GetPlayerVehicleID ( playerid ) , tmp2 , tmp2 ) ;
            format ( String , sizeof ( String ) , "Voce Mudou a Cor do seu veiculo para : %i" , tmp2 ) ;
            SendClientMessage ( playerid , -1 , String ) ;
            return 1;
    }

    if ( strcmp ( "/ajudacarro" , cmdtext ) == 0 )
    {
        SendClientMessage ( playerid , 0xCBCCCEFF, "*** CARRO *** /estacionar /vendercarro /localizarcarro /pintar");
        return true;
    }

    if ( strcmp ( cmdtext , "/testarpos" , true ) == 0 )
    {
        AtualizarPos ( ) ;
        printf ( "PosX: %f, PosY: %f, PosZ: %f, PosA: %f" , GetPVarFloat ( playerid , "PosX" ) , GetPVarFloat ( playerid , "PosY" ) , GetPVarFloat ( playerid , "PosZ" ) , GetPVarFloat ( playerid , "PosA" ) ) ;
        return true ;
    }

    return false;
}

public
    OnPlayerStateChange(playerid, newstate, oldstate)
{
    if ( newstate == PLAYER_STATE_DRIVER )
        {
        if ( CarroJogador [ playerid ] == GetPlayerVehicleID ( playerid ) )
            {
            new
                owner [ MAX_PLAYER_NAME ]
            ;
            GetPlayerName ( InfoCarro [ playerid ] [ s_Dono ] , owner , sizeof ( owner ) ) ;
            format ( String , sizeof ( String ) , "Este(a) \"%s\" pertence a %s." , GetVehicleNameFromID ( GetPlayerVehicleID ( playerid ) ) , owner ) ;
            SendClientMessage ( playerid , 0xFFFFFFAA , String ) ;
            }
        }
        else if ( newstate == PLAYER_STATE_DRIVER )
        {
            if ( CarroJogador [ playerid ] != GetPlayerVehicleID ( playerid ) )
            {
                format ( String, sizeof ( String ) , "Veнculo de %s somente ele(a) pode dirigi-lo!" , InfoCarro[ playerid ] [ s_Dono ] ) ;
                SendClientMessage ( playerid , -1 , String ) ;
                PlayerPlaySound ( playerid , 1147 , 0.0 , 0.0 , 0.0) ;
                RemovePlayerFromVehicle ( playerid ) ;
            }
    }
    return true;
}

public
    OnDialogResponse ( playerid , dialogid , response , listitem , inputtext[] )
{
    if ( dialogid == 120+120 )
    {
        if ( response )
        {
        //TogglePlayerControllable ( playerid , false ) ;
        PutPlayerInVehicle ( playerid , CarroConcessionaria [ listitem ] , 0 ) ;
        new stringdois[128];
        format(stringdois, sizeof(stringdois), "Vocк deseja comprar este %s por %d ?", GetVehicleNameFromID(GetPlayerVehicleID(playerid)), RetornarCarro ( playerid ) );
        ShowPlayerDialog ( playerid , 120+121 , DIALOG_STYLE_MSGBOX , "Compra de Veiculo" , stringdois , "Sim" , "Nгo" ) ;
        ModeloIDCarro [ playerid ] = GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) ;
        }
        return true;
    }

    if ( dialogid == 120+121 )
    {
        if(response)
        {
        if ( GetPlayerMoney ( playerid ) < InfoVenda [ playerid ] [ PrecoCarro ] )
                    return SendClientMessage ( playerid , -1 , "Vocк nгo tem dinheiro suficiente !" ) ;
        SetPlayerPos ( playerid , 1699.2 , 1435.1 , 10.7 ) ;

        new
            Float:x_set ,
            Float:y_set ,
            Float:z_set ,
            Float:a_set
        ;

        GetPlayerPos( playerid, x_set, y_set, z_set ) ;
        GetPlayerFacingAngle( playerid, a_set ) ;

        format( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;

        if(! dini_Create ( String ) ) return dini_Create ( String ) ;
        CarroJogador [ playerid ]   = CreateVehicle ( ModeloIDCarro [ playerid ] , 1699.2 , 1435.1 , 10.7 , a_set , 1 , 1, -1 ) ;

        PutPlayerInVehicle ( playerid , CarroJogador [ playerid ] , 0 ) ;
        dini_Set ( String , "DonoCarro" , PlayerName ( playerid ) ) ;
        dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
        dini_IntSet ( String , "Modelo" , InfoVenda [ playerid ] [ ModeloCarro ] ) ;
        dini_FloatSet ( String , "PosX" , x_set ) ;
        dini_FloatSet ( String , "PosY" , y_set ) ;
        dini_FloatSet ( String , "PosZ" , z_set ) ;
        dini_FloatSet ( String , "Angulo" , a_set ) ;
        dini_IntSet ( String , "Cor1" , 1 ) ;
        dini_IntSet ( String , "Cor2" , 1 ) ;
        dini_IntSet ( String , "Respawn" , -1 ) ;

        format( InfoCarro[ GetPlayerVehicleID ( playerid ) ][ s_Dono ], 24, dini_Get( String, "DonoCarro" ));

        InfoCarro[ playerid ] [ s_Dono ] = dini_Int ( String , "DonoCarro" ) ;
        InfoVenda[ playerid ] [ ModeloCarro ] = dini_Int ( String , "Modelo" ) ;
        InfoCarro[ playerid ] [ s_PosX ] = dini_Float ( String , "PosX" ) ;
        InfoCarro[ playerid ] [ s_PosY ] = dini_Float ( String , "PosY" ) ;
        InfoCarro[ playerid ] [ s_PosZ ] = dini_Float ( String , "PosZ" ) ;
        InfoCarro[ playerid ] [ s_PosA ] = dini_Float ( String , "Angulo" ) ;
        InfoCarro[ playerid ] [ s_Cor1 ] = dini_Int ( String , "Cor1" ) ;
        InfoCarro[ playerid ] [ s_Cor2 ] = dini_Int ( String , "Cor2" ) ;
        InfoCarro[ playerid ] [ s_Respawn ] = dini_Int ( String , "Respawn" ) ;
        RemovePlayerFromVehicle ( playerid ) ;
        TogglePlayerControllable ( playerid , true ) ;
        }
        else
        {
        RemovePlayerFromVehicle ( playerid ) ;
        TogglePlayerControllable ( playerid , true ) ;
        }
    }
    return true;
}

forward RetornarCarro ( playerid ) ;
public
    RetornarCarro ( playerid )
{
    switch ( GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) )
    {
        case 411: InfoVenda [ playerid ] [ PrecoCarro ] = 500000 ;
        case 451: InfoVenda [ playerid ] [ PrecoCarro ] = 450000 ;
        case 522: InfoVenda [ playerid ] [ PrecoCarro ] = 100000 ;
        case 415: InfoVenda [ playerid ] [ PrecoCarro ] = 200000 ;
    }
    return InfoVenda [ playerid ] [ PrecoCarro ];
}

forward AtualizarPos ( ) ;
public
    AtualizarPos ( )
{
    for ( new i ; i < MAX_PLAYERS ; i ++ )
    {
        if ( ! IsPlayerConnected ( i ) ) continue ;
        new
            Float:JK [ 4 ]
        ;
        GetPlayerPos ( i , JK [ 0 ] , JK [ 1 ] , JK [ 2 ] ) ;
        GetPlayerFacingAngle ( i , JK [ 3 ] ) ;
        SetPVarFloat ( i , "PosX" , JK [ 0 ] ) ;
        SetPVarFloat ( i , "PosY" , JK [ 1 ] ) ;
        SetPVarFloat ( i , "PosZ" , JK [ 2 ] ) ;
        SetPVarFloat ( i , "PosA" , JK [ 3 ] ) ;
    }
    return true ;
}

forward GameModeExitFunc ( playerid ) ;
public
    GameModeExitFunc ( playerid )
{
    format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
    if ( dini_Exists ( String ) )
    {
        dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
        dini_IntSet ( String , "Modelo" , InfoVenda [ playerid ] [ ModeloCarro ] ) ;
        dini_FloatSet ( String , "PosX" , InfoCarro [ playerid ] [ s_PosX ] ) ;
        dini_FloatSet ( String , "PosY" , InfoCarro [ playerid ] [ s_PosY ] ) ;
        dini_FloatSet ( String , "PosZ" , InfoCarro [ playerid ] [ s_PosZ ] ) ;
        dini_FloatSet ( String , "Angulo" , InfoCarro [ playerid ] [ s_PosA ] ) ;
        dini_IntSet ( String , "Cor1" , InfoCarro [ playerid ] [ s_Cor1 ] ) ;
        dini_IntSet ( String , "Cor2" , InfoCarro [ playerid ] [ s_Cor2 ] ) ;
        dini_IntSet ( String , "Respawn" , InfoCarro [ playerid ] [ s_Respawn ] ) ;
        DestroyVehicle ( CarroJogador [ playerid ] ) ;
    }
    return true;
}

stock
    PlayerName ( playerid )
    {
    new Nome [ MAX_PLAYER_NAME ] ;
    GetPlayerName ( playerid , Nome , sizeof ( Nome ) ) ;
    return Nome;
}

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;
}

stock
    GetVehicleNameFromID(vehicleid)
{
    static const scVehicleNames [ ] [ 18 ] = {
        "Landstalker",
        "Bravura",
        "Buffalo",
        "Linerunner",
        "Perrenial",
        "Sentinel",
        "Dumper",
        "Firetruck",
        "Trashmaster",
        "Stretch",
        "Manana",
        "Infernus",
        "Voodoo",
        "Pony",
        "Mule",
        "Cheetah",
        "Ambulance",
        "Leviathan",
        "Moonbeam",
        "Esperanto",
        "Taxi",
        "Washington",
        "Bobcat",
        "Mr Whoopee",
        "BF Injection",
        "Hunter",
        "Premier",
        "Enforcer",
        "Securicar",
        "Banshee",
        "Predator",
        "Bus",
        "Rhino",
        "Barracks",
        "Hotknife",
        "Trailer 1",
        "Previon",
        "Coach",
        "Cabbie",
        "Stallion",
        "Rumpo",
        "RC Bandit",
        "Romero",
        "Packer",
        "Monster",
        "Admiral",
        "Squalo",
        "Seasparrow",
        "Pizzaboy",
        "Tram",
        "Trailer 2",
        "Turismo",
        "Speeder",
        "Reefer",
        "Tropic",
        "Flatbed",
        "Yankee",
        "Caddy",
        "Solair",
        "Berkley's RC Van",
        "Skimmer",
        "PCJ-600",
        "Faggio",
        "Freeway",
        "RC Baron",
        "RC Raider",
        "Glendale",
        "Oceanic",
        "Sanchez",
        "Sparrow",
        "Patriot",
        "Quad",
        "Coastguard",
        "Dinghy",
        "Hermes",
        "Sabre",
        "Rustler",
        "ZR-350",
        "Walton",
        "Regina",
        "Comet",
        "BMX",
        "Burrito",
        "Camper",
        "Marquis",
        "Baggage",
        "Dozer",
        "Maverick",
        "News Chopper",
        "Rancher",
        "FBI Rancher",
        "Virgo",
        "Greenwood",
        "Jetmax",
        "Hotring",
        "Sandking",
        "Blista Compact",
        "Police Maverick",
        "Boxville",
        "Benson",
        "Mesa",
        "RC Goblin",
        "Hotring Racer A",
        "Hotring Racer B",
        "Bloodring Banger",
        "Rancher",
        "Super GT",
        "Elegant",
        "Journey",
        "Bike",
        "Mountain Bike",
        "Beagle",
        "Cropdust",
        "Stunt",
        "Tanker",
        "Roadtrain",
        "Nebula",
        "Majestic",
        "Buccaneer",
        "Shamal",
        "Hydra",
        "FCR-900",
        "NRG-500",
        "HPV1000",
        "Cement Truck",
        "Tow Truck",
        "Fortune",
        "Cadrona",
        "FBI Truck",
        "Willard",
        "Forklift",
        "Tractor",
        "Combine",
        "Feltzer",
        "Remington",
        "Slamvan",
        "Blade",
        "Freight",
        "Streak",
        "Vortex",
        "Vincent",
        "Bullet",
        "Clover",
        "Sadler",
        "Firetruck LA",
        "Hustler",
        "Intruder",
        "Primo",
        "Cargobob",
        "Tampa",
        "Sunrise",
        "Merit",
        "Utility",
        "Nevada",
        "Yosemite",
        "Windsor",
        "Monster A",
        "Monster B",
        "Uranus",
        "Jester",
        "Sultan",
        "Stratum",
        "Elegy",
        "Raindance",
        "RC Tiger",
        "Flash",
        "Tahoma",
        "Savanna",
        "Bandito",
        "Freight Flat",
        "Streak Carriage",
        "Kart",
        "Mower",
        "Duneride",
        "Sweeper",
        "Broadway",
        "Tornado",
        "AT-400",
        "DFT-30",
        "Huntley",
        "Stafford",
        "BF-400",
        "Newsvan",
        "Tug",
        "Trailer 3",
        "Emperor",
        "Wayfarer",
        "Euros",
        "Hotdog",
        "Club",
        "Freight Carriage",
        "Trailer 3",
        "Andromada",
        "Dodo",
        "RC Cam",
        "Launch",
        "LS Police Car",
        "SF Police Car",
        "LV Police Car",
        "Police Ranger",
        "Picador",
        "S.W.A.T. Van",
        "Alpha",
        "Phoenix",
        "Glendale",
        "Sadler",
        "Luggage Trailer A",
        "Luggage Trailer B",
        "Stair Trailer",
        "Boxville",
        "Farm Plow",
        "Utility Trailer"
    },
    scOnFoot [ 18 ] = "OnFoot" ;
    if ( vehicleid > 0 ) {
        return scVehicleNames [ GetVehicleModel ( vehicleid ) - 400 ] ;
    }
    else {
        return scOnFoot ;
    }
}



Re: [Ajuda]Como Arrumar isso?? - Truck - 25.06.2012

Quais erros que aparece ? Eu compilei aqui normalmente. O erro aн em seu pawno deve ser as includes.
Ou vocк quis dizer bug e nгo erros !?!?


Re: [Ajuda]Como Arrumar isso?? - [BD]Cachorro_[BD] - 25.06.2012

Ajuda Ai Pelo Amor de Deus!
Os erros sгo os Seguintes:

Код:
E:\ServersSamp\BrasilDiverзгo[BD]\CONCE.pwn(207) : error 047: array sizes do not match, or destination array is too small
E:\ServersSamp\BrasilDiverзгo[BD]\CONCE.pwn(208) : error 047: array sizes do not match, or destination array is too small
E:\ServersSamp\BrasilDiverзгo[BD]\CONCE.pwn(481) : error 021: symbol already defined: "strtok"
E:\ServersSamp\BrasilDiverзгo[BD]\CONCE.pwn(496) : error 047: array sizes do not match, or destination array is too small



Re: [Ajuda]Como Arrumar isso?? - [BD]Cachorro_[BD] - 25.06.2012

Alguem ajuda ai to precisando mUIIITOOO...... Alguem aiiiiiiiiii


Re: [Ajuda]Como Arrumar isso?? - [BD]Cachorro_[BD] - 25.06.2012

Por favor alguem me ajuda


Re: [Ajuda]Como Arrumar isso?? - [BD]Cachorro_[BD] - 25.06.2012

Putz...Ninguem Me Ajuda Por Favor To Implorando!!


Re: [Ajuda]Como Arrumar isso?? - [BD]Cachorro_[BD] - 25.06.2012

ASei q to pedindo de mais ta encomodando? Й eu tmb sei !! Sу q nao consigo Arruma pelo amor de... Alguem pode me ajudar


Re: [Ajuda]Como Arrumar isso?? - [BD]Cachorro_[BD] - 25.06.2012

Opa Consegui arrumar pode Deixar Desculpem Pelo Transtorno e o Encomodo e Vlw pela "FRACA" atenзгo""!!!


Re: [Ajuda]Como Arrumar isso?? - Hunter_Xtreme - 25.06.2012

Cara, nгo culpe os outros por nгo responderem o seu tуpico, porque aqui ninguem fica 24h disponivel pra responder as perguntas porque sao muitas e nem sempre a maioria vai saber respondк- las, e TOME CUIDADO com o flood, espere alguem responder o seu topico caso o problema nao seja resolvido '-'