SA-MP Forums Archive
[Ajuda]Veiculos Rc's - 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]Veiculos Rc's (/showthread.php?tid=267478)



[Ajuda]Veiculos Rc's - gabrieldefreitas11 - 08.07.2011

iae Pessoal!
tava pensando em colocar uns Rc's, Tipo Rc Baron..
so q eu coloco assim:
PHP код:
//OnGameModeInit()
AddStaticVehicleEx(464,1487.34826660,1114.01525879,19.67317581,89.99450684,-1,-1,15);//Rc Baron 
aparece o veiculo la, so q nao consigo pega-lo, Dirigi-lo
se alguem puder me ajudar agradeзo!


Re: [Ajuda]Veiculos Rc's - ApolloRJ - 08.07.2011

isso resolve seu problema... assim tu entra e sae dos carros RC ....


pawn Код:
#include <a_samp>
#define RC_ENTER_RANGE 8
new RCVehicles[] = {
    441,
    464,
    465,
    501,
    564,
    594
};
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/test", cmdtext, true))
    {
        new Float:x,Float:y,Float:z,Float:a;
        GetPlayerPos(playerid,x,y,z);
        GetPlayerFacingAngle(playerid,a);
        CreateVehicle(RCVehicles[random(6)],x,y,z,a,-1,-1,60);
        return 1;
    }
    return 0;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 16)
    {
        new Float:x,Float:y,Float:z;
        if(IsPlayerInAnyVehicle(playerid) && IsVehicleRCVehicle(GetPlayerVehicleID(playerid)))
        {
            GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
            SetPlayerPos(playerid,x,y,z+1.8);
            return 1;
        }
        for(new v; v < MAX_VEHICLES; v++)
        {
            GetVehiclePos(v,x,y,z);
            if(IsPlayerInRangeOfPoint(playerid,RC_ENTER_RANGE,x,y,z) && IsVehicleRCVehicle(v))
            {
                PutPlayerInVehicle(playerid,v,0);
                return 1;
            }
        }
    }
    return 1;
}

stock IsVehicleRCVehicle(vehicleid)
{
    for(new v; v < 6; v++)
    {
        if(GetVehicleModel(vehicleid) == RCVehicles[v]) return 1;
    }
    return 0;
}
Obs: se eu te ajudei clika em reputaзгo ai na estrelinha Obrigado!!!

By ApolloRJ


Respuesta: [Ajuda]Veiculos Rc's - gabrieldefreitas11 - 08.07.2011

Muito bom!!
Vlw Lek


Re: [Ajuda]Veiculos Rc's - Macintosh - 08.07.2011

Sinto lhe dizer mais esse sistema encontra-se bugado. Quando й pressionado enter para ele sair do veнculo, ele volta a entrar.


Re: [Ajuda]Veiculos Rc's - ApolloRJ - 08.07.2011

aqui funciona perfeitamente ate fiz um menu.. RC.. aqui fico rox.... o sistema nгo e meu.. sу para ressaltar.. apenas retirei do fуrum da msm maneira.. que achei.. e aqui funciona.... =p

By ApolloRJ


Re: [Ajuda]Veiculos Rc's - Andrew_Guiga - 08.07.2011

eu acho legal esse carinhos


Re: [Ajuda]Veiculos Rc's - Macintosh - 08.07.2011

Entгo acho que estб conflitando com algo aqui :/.
Vou ver..


Re: [Ajuda]Veiculos Rc's - BrunoBSF - 10.07.2011

Concordo com vc Andrew sao muito tops