Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dcmd_biznis(playerid, params[])
- {
- #pragma unused params
- new string[128];
- new opcija[24];
- if(sscanf(params, "s[24]",opcija))
- {
- SendClientMessage(playerid, COLOR_GREY, "Koriscenje: /biznis ([opcija])");
- SendClientMessage(playerid, COLOR_WHITE, "OPCIJE: buy, meni");
- return 1;
- }
- if(strcmp(opcija,"buy", true) == 0)
- {
- if (GetPlayerVehicleSeat(playerid) == -1)
- {
- for (new BusID = 1; BusID < sizeof(ABusinessData); BusID++)
- {
- if (IsValidDynamicPickup(ABusinessData[BusID][PickupIDS]))
- {
- if (IsPlayerInRangeOfPoint(playerid, 2.5, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]))
- {
- if (ABusinessData[BusID][Owned] == false)
- {
- new BusType;
- BusType = ABusinessData[BusID][BusinessType];
- if (INT_GetPlayerMoney(playerid) >= ABusinessInteriors[BusType][BusPrice])
- Business_SetOwner(playerid, BusID);
- else
- SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca!");
- }
- else
- {
- format(string, 128, "Biznis ima vlasnika: %s.", ABusinessData[BusID][Owner]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- }
- return 1;
- }
- }
- }
- SendClientMessage(playerid, COLOR_GREY, "Morate stojati na pickupu!");
- }
- else SendClientMessage(playerid, COLOR_GREY, "Morate biti van vozila!");
- }
- //ovde dodaji sledece dakle menu
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement