Locking Vehicles
#4

The stock is a function, meaning you can put it anywhere you want in the script (just not inside of another function or brackets or anything and make sure it's after the #includes).


To add the code to what you already have you can just add it to the bottom.

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (GetPlayerSurfingVehicleID(playerid) == vehicleid)
    {
        ClearAnimations(playerid);
    }

    new model = GetVehicleModel(vehicleid);
    if(model == 596)
    {
        Player[playerid][GotInCopCar]++;
        ResetPlayerWeapons(playerid);
        GivePlayerSavedWeapons(playerid);
    }

	if(IsACopCar(vehicleid) && !ispassenger)
	{
 		if(Groups[Player[playerid][Group]][CommandTypes] == 1)
	    {
			SendClientMessage(playerid, -1, "You are not a cop!");
			ClearAnimations(playerid);
		}
	}
    return 1;
}
Reply


Messages In This Thread
Locking Vehicles - by Kalkor - 15.12.2014, 04:40
Re: Locking Vehicles - by Divergent - 15.12.2014, 04:56
Re: Locking Vehicles - by Kalkor - 15.12.2014, 05:07
Re: Locking Vehicles - by Divergent - 15.12.2014, 05:16
Re: Locking Vehicles - by Kalkor - 15.12.2014, 05:45
Re: Locking Vehicles - by Divergent - 15.12.2014, 05:47

Forum Jump:


Users browsing this thread: 1 Guest(s)