RemovePlayerFromVehicle
#6

Hi

I'll teach you how to create cars for factions

Its very easy, Here's what you have to do
First assign a variable for the cars, LSPDcar for ex.

pawn Код:
new LSPDcar[3]
Now lets define these variables

pawn Код:
LSPDcar[0] = AddStaticVehicle(coords and modelid goes here)
// and so on
Now you need to paste this
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)//It means when player's state changes to drivers position
    {
        new Vehid = GetPlayerVehicleID(playerid);//Defining variable Vehid, So Vehid means GetVehicleID
        if(Vehid == LSPDcar[0] && if(PlayerInfo[playerid][pmember] != 1)// if vehicle Id is equal to LSPD car & player is NOT in police
        {
            RemovePlayerFromVehicle(playerid);//GTFO from this car
            SendClientMessage(playerid, color_red, "You're not in LSPD Dumbass!");// Lol
        }
    }
    return 1;
}
PS: I don't understand the 'skin' thingy you asked...
Reply


Messages In This Thread
RemovePlayerFromVehicle - by Gooday - 06.12.2011, 12:08
Re: RemovePlayerFromVehicle - by JamesC - 06.12.2011, 12:20
Re: RemovePlayerFromVehicle - by THE_KNOWN - 06.12.2011, 12:20
Re: RemovePlayerFromVehicle - by Gooday - 06.12.2011, 12:21
Re: RemovePlayerFromVehicle - by THE_KNOWN - 06.12.2011, 12:28
Re: RemovePlayerFromVehicle - by SupremeCommander - 06.12.2011, 12:50
Re: RemovePlayerFromVehicle - by SupremeCommander - 06.12.2011, 12:56

Forum Jump:


Users browsing this thread: 1 Guest(s)