Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. dcmd_biznis(playerid, params[])
  2. {
  3. #pragma unused params
  4. new string[128];
  5. new opcija[24];
  6. if(sscanf(params, "s[24]",opcija))
  7. {
  8. SendClientMessage(playerid, COLOR_GREY, "Koriscenje: /biznis ([opcija])");
  9. SendClientMessage(playerid, COLOR_WHITE, "OPCIJE: buy, meni");
  10. return 1;
  11. }
  12.  
  13. if(strcmp(opcija,"buy", true) == 0)
  14. {
  15. if (GetPlayerVehicleSeat(playerid) == -1)
  16. {
  17. for (new BusID = 1; BusID < sizeof(ABusinessData); BusID++)
  18. {
  19. if (IsValidDynamicPickup(ABusinessData[BusID][PickupIDS]))
  20. {
  21. if (IsPlayerInRangeOfPoint(playerid, 2.5, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]))
  22. {
  23. if (ABusinessData[BusID][Owned] == false)
  24. {
  25. new BusType;
  26. BusType = ABusinessData[BusID][BusinessType];
  27. if (INT_GetPlayerMoney(playerid) >= ABusinessInteriors[BusType][BusPrice])
  28. Business_SetOwner(playerid, BusID);
  29. else
  30. SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca!");
  31. }
  32. else
  33. {
  34. format(string, 128, "Biznis ima vlasnika: %s.", ABusinessData[BusID][Owner]);
  35. SendClientMessage(playerid, COLOR_WHITE, string);
  36. }
  37. return 1;
  38. }
  39. }
  40. }
  41. SendClientMessage(playerid, COLOR_GREY, "Morate stojati na pickupu!");
  42. }
  43. else SendClientMessage(playerid, COLOR_GREY, "Morate biti van vozila!");
  44. }
  45. //ovde dodaji sledece dakle menu
  46. return 1;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement