Oblivion_UFF

qwasdasd

Feb 8th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. CMD:check(playerid, params[])
  2. {
  3. if(!pLoggedIn[playerid])return true;
  4.  
  5. new string[2000], hid = IsPlayerInProperty(playerid);
  6.  
  7. string[0] = 0;
  8. new
  9. Float:x,
  10. Float:y,
  11. Float:z
  12. ;
  13.  
  14. if(!IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)
  15. {
  16. GetVehicleBoot(vehicleid, x, y, z);
  17.  
  18. new vehicleid = GetPlayerVehicleID(playerid);
  19.  
  20. if(!IsValidFactionCar(vehicleid) && !IsValidPlayerCar(vehicleid))
  21. return SendClientMessage(playerid, COLOR_ADM, "SERVER: This command can only be used for private vehicles. You are in a public static vehicle.");
  22.  
  23. if(!IsPlayerInRangeOfPoint(playerid, 2.5, x, y, z))
  24. return SendClientMessage(playerid, COLOR_YELLOW, "You aren't near the vehicles trunk.");
  25.  
  26.  
  27. if(IsValidPlayerCar(vehicleid))
  28. {
  29. for(new i = 1; i < 5; i++)
  30. {
  31. if(!CarData[vehicleid][carWeapons][i])
  32. format(string, sizeof(string), "%sWeapon %d: [Empty]\n", string, i);
  33.  
  34. else
  35. format(string, sizeof(string), "%sWeapon %d: %s[Ammo: %d]\n", string, i, ReturnWeaponName(CarData[vehicleid][carWeapons][i]), CarData[vehicleid][carWeaponsAmmo][i]);
  36.  
  37. ShowPlayerDialog(playerid, DIALOG_USE, DIALOG_STYLE_LIST, "Trunk", string, ">>>", "");
  38. }
  39. }
  40. else if(IsValidFactionCar(vehicleid))
  41. {
  42. if(FactionCar[vehicleid][carFaction] > 0 && FactionCar[vehicleid][carFaction] == PlayerData[playerid][pFaction] && FactionCar[vehicleid][carGunRack])
  43. {
  44. ShowPlayerDialog(playerid, DIALOG_USE, DIALOG_STYLE_LIST, "Trunk", "Weapon 1: Shotgun[Ammo: 100]\nWeapon 2: MP5[Ammo:200]\nWeapon 3: M4[Ammo:200]\nWeapon 4: SPAZ[Ammo:100]\nWeapon 5: Sniper[Ammo:50]\nWeapon 6: Camera\nWeapon 7: Pepperspray", "Ok", "");
  45. }
  46. }
  47. }
Add Comment
Please, Sign In to add comment