Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- Seatbelt[playerid] = 0;
- IsPlayerSteppingInVehicle[playerid] = vehicleid;
- if(PlayerCuffed[playerid] != 0) SetPVarInt( playerid, "ToBeEjected", 1 );
- if(GetPVarInt(playerid, "Injured") == 1) SetPVarInt(playerid, "ToBeEjected", 1);
- SetPVarInt(playerid, "LastWeapon", GetPlayerWeapon(playerid));
- new engine,lights,alarm,doors,bonnet,boot,objective;
- GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
- if(engine == VEHICLE_PARAMS_UNSET) switch(GetVehicleModel(vehicleid)) {
- case 509, 481, 510: VehicleFuel[vehicleid] = 100, arr_Engine{vehicleid} = 1, SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
- default: SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective), arr_Engine{vehicleid} = 0;
- }
- if (ispassenger != 0)
- {
- if (GetVehicleModel(vehicleid) == 519)
- {
- if (ShamalExists(vehicleid) == 0)
- {
- if (get_available_objects() > (MAX_OBJECTS-objects_per_shamal)) return 1;
- CreateShamalInt(vehicleid, randomEx(3000), randomEx(3000), float(random(100)+800));
- }
- SetPlayerPosInShamal(playerid, vehicleid);
- }
- }
- /*if(GetPVarInt(playerid, "Pizza") != 0 && !(IsAPizzaCar(vehicleid)))
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.3);
- PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
- RemovePlayerFromVehicle(playerid);
- NOPCheck(playerid);
- SendClientMessageEx(playerid, COLOR_GRAD2, "You need to be in a PizzaBoy when delivering pizzas!");
- return 1;
- }*/
- if(!ispassenger)
- {
- SetPlayerArmedWeapon(playerid, 0);
- if(IsVIPcar(vehicleid))
- {
- if(PlayerInfo[playerid][pDonateRank] == 0)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.3);
- PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
- RemovePlayerFromVehicle(playerid);
- NOPCheck(playerid);
- SendClientMessageEx(playerid, COLOR_GRAD2, "You are not a VIP, this is a vehicle from the VIP Garage!");
- }
- }
- /* else if(IsAPizzaCar(vehicleid))
- {
- if(PlayerInfo[playerid][pJob] != 21 && PlayerInfo[playerid][pJob2] != 21)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.3);
- PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
- RemovePlayerFromVehicle(playerid);
- NOPCheck(playerid);
- SendClientMessageEx(playerid, COLOR_GRAD2, "You are not a Pizza Boy!");
- }
- }*/
Advertisement
Add Comment
Please, Sign In to add comment