Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:laybanh(playerid, params[]) {
- return cmd_getpizza(playerid, params);
- }
- CMD:getpizza(playerid, params[]) {
- if(PlayerInfo[playerid][pJob] != 21 && PlayerInfo[playerid][pJob2] != 21) {
- SendClientMessageEx(playerid,COLOR_GREY," Ban khong phai la Pizza Boy!");
- }
- else if(!IsAPizzaCar(GetPlayerVehicleID(playerid))) {
- SendClientMessageEx(playerid,COLOR_GREY," Ban phai mac trang phuc Pizza Boy theo dung yeu cau cua tiem Pizza Stack!");
- }
- else if(GetPlayerSkin(playerid) != 155) {
- SendClientMessageEx(playerid,COLOR_GREY," Ban can phai co trong Pizza Stack uniform!");
- }
- else if(GetPVarType(playerid, "Pizza")) {
- SendClientMessageEx(playerid, COLOR_GREY, " Ban da cung cap banh pizza!");
- }
- else if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2096.1035,-1795.0962,13.3889)) {
- SendClientMessageEx(playerid,COLOR_GREY," Ban dang khong o Pizza Stack pickup!");
- }
- else {
- new rand = random(MAX_HOUSES - 1);
- while(!(HouseInfo[rand][hOwned])) {
- if(++rand >= MAX_HOUSES) {
- rand = 1;
- }
- }
- new
- iDist = floatround(GetPlayerDistanceFromPoint(playerid, HouseInfo[rand][hExteriorX], HouseInfo[rand][hExteriorY], HouseInfo[rand][hExteriorZ])),
- szMessage[86];
- SetPVarInt(playerid, "tpPizzaTimer", iDist / 80);
- SetPVarInt(playerid, "pizzaTotal", iDist / 10);
- SetPVarInt(playerid, "pizzaTimer", iDist / 10);
- SetPVarInt(playerid, "Pizza", rand);
- SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPPIZZARUNTIMER);
- SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_PIZZATIMER);
- format(szMessage, sizeof(szMessage), "Ban cung cap pizza cho %s. Ban co %d giay de cung cap no!", StripUnderscore(HouseInfo[rand][hOwnerName]), iDist / 10);
- SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
- SetPlayerCheckpoint(playerid, HouseInfo[rand][hExteriorX], HouseInfo[rand][hExteriorY], HouseInfo[rand][hExteriorZ], 5);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement