[Ajuda] Otimizaзгo desde cуdigo
#3

Tente assim:
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER){

        static vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
       
       
        if(IsPlayerInArea(playerid, 1008,1632,1212,1806)){
            if(IsPlayerInAnyVehicle(playerid)){
                armasAtivadas = false;
            }
        }
        else
        {
            armasAtivadas = true;
            if(armasAtivadas == true)
            {
                if(GetVehicleModel(vehicleid) == 415)
                {

                    Bazuca1 = CreateObject(360, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                    Bazuca2 = CreateObject(360, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                    Minigun1 = CreateObject(362, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                    Minigun2 = CreateObject(362, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);

                    AttachObjectToVehicle(Bazuca1, vehicleid, 1026.5,1795.4,10.8,0.0,0.0,0.0);
                    AttachObjectToVehicle(Bazuca2, vehicleid, 0.2, -0.2, 0.7, 0.0, 0.0, 90.0);
                    AttachObjectToVehicle(Minigun1, vehicleid, 0.0, 0.0, 0.7, 0.0, 0.0, 90.0);
                    AttachObjectToVehicle(Minigun2, vehicleid, -0.2, -0.2, 0.7, 0.0, 0.0, 90.0);
                    return 1;
                }
            }
        }
    }
    return true;
}
Reply


Messages In This Thread
Otimizaзгo desde cуdigo - by Mr_Taxi - 08.12.2012, 00:44
Re: Otimizaзгo desde cуdigo - by [JD]BlackFire - 08.12.2012, 00:47
Re: Otimizaзгo desde cуdigo - by zSuYaNw - 08.12.2012, 02:27

Forum Jump:


Users browsing this thread: 1 Guest(s)