OnPlayerEnterAVehicle
#3

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float: fX, Float: fY, Float: fZ;
    GetPlayerPos(playerid, fX, fY, fZ);
    if(admincar)
    {
        if(IsPlayerAdmin(playerid))
        {
            SendClientMessage(playerid,0x000000FF,"Welcome Admin in Vehicle");
        }
        else
        {
            SendClientMessage(playerid,0x000000FF,"You are not admin!");
            SetPlayerPos(playerid, fX, fY, fZ);
        }
    }
    return 1;
}
When you use OnPlayerEnterVehicle, it is called when they press enter or F, not when they are in the vehicle, so when you do RemovePlayerFromVehicle, they're not actually in the car, it has been called to early, so you get the position and then set the position afterwards, should work, if not, let me know.
Reply


Messages In This Thread
OnPlayerEnterVehicle - by Aleksa98 - 29.03.2013, 11:58
Re: OnPlayerEnterAVehicle - by sniperwars - 29.03.2013, 12:15
Re: OnPlayerEnterAVehicle - by MattyG - 29.03.2013, 12:18
Re: OnPlayerEnterAVehicle - by Konstantinos - 29.03.2013, 12:22
Re: OnPlayerEnterAVehicle - by Aleksa98 - 29.03.2013, 12:29
Re: OnPlayerEnterAVehicle - by Aleksa98 - 29.03.2013, 12:37
Re: OnPlayerEnterAVehicle - by Konstantinos - 29.03.2013, 12:46
Re: OnPlayerEnterAVehicle - by FunnyBear - 29.03.2013, 12:46
Re: OnPlayerEnterAVehicle - by Aleksa98 - 29.03.2013, 12:48

Forum Jump:


Users browsing this thread: 2 Guest(s)