Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:rlock(playerid)
- {
- if(GetPVarInt(playerid, "Rent") == 0) return SCM(playerid, COLOR_GREY, "Вы не арендуете транспортное средство!");
- new vehicleid = GetPlayerVehicleID(playerid);
- new lockstatus = gCarLock[vehicleid];
- new Float:cx,Float:cy,Float:cz;
- GetVehiclePos(vehicleid, cx, cy, cz);
- switch (lockstatus)
- {
- case 0:
- {
- if(PlayerToPoint(4.0, playerid, cx, cy, cz))
- {
- GameTextForPlayer(playerid, "~r~Locked", 1000, 4);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- LockCar(vehicleid);
- IsLocked[playerid] = 1;
- gCarLock[playerid] = 1;
- GetVehicleParamsEx(GetPVarInt(playerid, "Rent"),engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(GetPVarInt(playerid, "Rent"),engine,lights,alarm,true,bonnet,boot,objective);
- }
- }
- case 1:
- {
- if(PlayerToPoint(4.0, playerid, cx, cy, cz))
- {
- GameTextForPlayer(playerid, "~g~Locked", 1000, 4);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- gCarLock[playerid] = 0;
- UnLockCar(vehicleid);
- IsLocked[playerid] = 0;
- GetVehicleParamsEx(GetPVarInt(playerid, "Rent"),engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(GetPVarInt(playerid, "Rent"),engine,lights,alarm,false,bonnet,boot,objective);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement