[Help] SetPlayerPos is not working
#6

SetVehicleParamsForPlayer has it's downs, It has to be re-synced every time a vehicle is streamed in (Which would require a loop, checking if it's a cop vehicle or something, every time a vehicle comes into sight)

And you can't get in it as a passenger, it's best to keep it at OnPlayerStateChange.

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid), m = GetVehicleModel(vehicleid);
        if(m == 405)
        {
            GameTextForPlayer(playerid, "Civilian Vehicle", 3000, 3);
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid, COLOR_WHITE, "You can start your engine by typing: /start");
        }
        else if(m == 596)
        {
            new Float:x, Float:y, Float:z;
            if(gTeam[playerid] != POLICE)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You are not a cop!");
            }
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid, COLOR_WHITE, "You can start your engine by typing: /start");
        }
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
[Help] SetPlayerPos is not working - by Emanuel_Rodriguez - 30.07.2010, 21:32
Re: [Help] SetPlayerPos is not working - by LeNy - 30.07.2010, 21:36
Re: [Help] SetPlayerPos is not working - by Emanuel_Rodriguez - 30.07.2010, 21:39
Re: [Help] SetPlayerPos is not working - by Hijolion - 30.07.2010, 22:24
Re: [Help] SetPlayerPos is not working - by Mike Garber - 30.07.2010, 23:10
Re: [Help] SetPlayerPos is not working - by Joe_ - 30.07.2010, 23:17
Re: [Help] SetPlayerPos is not working - by Steven82 - 30.07.2010, 23:34

Forum Jump:


Users browsing this thread: 1 Guest(s)