[AJUDA] SetPlayerVelocity? ou SetVehicleVelocity
#2

Nunca usei o SetPlayerVelocity, mas uso isto no OnPlayerEnterVehicle:

pawn Код:
if(IsVehicleOccupied(vehicleid))
    {
        PutPlayerInVehicle(playerid, vehicleid, 1);
    }
    else
    {
        PutPlayerInVehicle(playerid, vehicleid, 0);
    }
Epб podes adaptar isto para funcionar com o Enter, etc.

pawn Код:
stock IsVehicleOccupied(vehicleid)
{
  for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
    return 1;
    }
    return 0;
}
Aconselho a mudares porque senгo entras no carro mesmo com a tecla G.

E se quiseres sair mais rбpido no OnPlayerExitVehicle podes usar:

pawn Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);
Nгo uses assim, alteras no SetPlayerPost, metes por exemplo no X, X+2. etc.
Reply


Messages In This Thread
[AJUDA] SetPlayerVelocity? ou SetVehicleVelocity - by BurrodaZero - 17.05.2010, 13:35
Re: [AJUDA] SetPlayerVelocity? ou SetVehicleVelocity - by russo666 - 17.05.2010, 13:51
Re: [AJUDA] SetPlayerVelocity? ou SetVehicleVelocity - by SuB_ZeRo0_ - 17.05.2010, 16:44
Re: [AJUDA] SetPlayerVelocity? ou SetVehicleVelocity - by _lsd_ - 08.09.2011, 21:53
Re: [AJUDA] SetPlayerVelocity? ou SetVehicleVelocity - by [O.z]Caroline - 08.09.2011, 21:57
Re: [AJUDA] SetPlayerVelocity? ou SetVehicleVelocity - by Pharrel - 08.09.2011, 22:01

Forum Jump:


Users browsing this thread: 1 Guest(s)