[Ajuda]Animaзгo
#2

Jб vi uma coisa parecida em um servidor, nгo sei como fazer isso mas tenho uma idйia. Modifiquei a funзгo ProxDetectorS do GF para fazer isso, espero que funcione :



Coloque:



pawn Код:
//No OnPlayerKeyStateChange:


for(new everyvehicle=0; everyvehicle<MAX_VEHICLES; everyvehicle++)
    {
        if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && VehicleProxDetectorS(5.0, playerid, everyvehicle))
        {
            if(IsPlayerConnected(playerid))
            {
                //Coloque a funзгo que executa o anim aqui !!
            }
        }
    }



//No Final do GameMode:


stock VehicleProxDetectorS(Float:radi, playerid, vehicleid)
{
    if(IsPlayerConnected(playerid) && !IsPlayerInAnyVehicle(playerid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        GetVehiclePos(vehicleid, posx, posy, posz);
        tempposx = (oldposx -posx);
        tempposy = (oldposy -posy);
        tempposz = (oldposz -posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}

Espero ter ajudado
Reply


Messages In This Thread
[Ajuda]Animaзгo - by >Ryder< - 08.12.2010, 23:10
Re: [Ajuda]Animaзгo - by rjjj - 09.12.2010, 00:17
Re: [Ajuda]Animaзгo - by >Ryder< - 10.12.2010, 21:37
Re: [Ajuda]Animaзгo - by [BEP]AcerPilot - 10.12.2010, 23:02
Re: [Ajuda]Animaзгo - by >Ryder< - 13.12.2010, 22:13
Re: [Ajuda]Animaзгo - by [BEP]AcerPilot - 13.12.2010, 23:03
Re: [Ajuda]Animaзгo - by Fabricio_Rios - 14.12.2010, 04:17
Re: [Ajuda]Animaзгo - by Rodrigo_LosT - 14.12.2010, 05:04
Re: [Ajuda]Animaзгo - by KevinsL - 14.12.2010, 10:36

Forum Jump:


Users browsing this thread: 4 Guest(s)