Personal Car Not Working
#3

Quote:
Originally Posted by Jacks
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
    {
        if(GetPlayerVehicleID(playerid) == Testcar)
        {
            new Float:X, Float:Y, Float:Z;
            GetVehiclePos(Fabmobile, X, Y, Z);
            SetPlayerPos(playerid, X, Y, Z);
            SendClientMessage(playerid, 0xFF0000FF, "You are not the owner of this car!");
            GameTextForPlayer(playerid, "~r~Ejected!", 3000, 5);
            TogglePlayerControllable(playerid, 1);
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
You see, the SetPlayerPos is for removing the player from the vehicle, as RemovePlayerFromVehicle performs the exit anim, but with SetPlayerPos it ejects the player in a better way.

And TogglePlayerControllable should be false, as the player should be frozen for 7,5 seconds, the timer should be in too.

And as i said, removeplayerfromvehicle is useless since the player is already ejected at that point.
Reply


Messages In This Thread
Personal Car Not Working - by [NWA]Hannes - 10.08.2010, 07:18
Re: Personal Car Not Working - by Jacks - 10.08.2010, 07:20
Re: Personal Car Not Working - by [NWA]Hannes - 10.08.2010, 07:23
Re: Personal Car Not Working - by DiddyBop - 10.08.2010, 07:58
Re: Personal Car Not Working - by Mike Garber - 10.08.2010, 09:33

Forum Jump:


Users browsing this thread: 1 Guest(s)