Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - Tìm dòng OnPlayerUpdate rồi add phía dưới
- if(GetPVarInt(playerid, "Pizza") > 0 && IsPlayerInRangeOfPoint(playerid, 18.0, HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorX], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorY], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorZ]))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(IsPlayerInAnuVehicle(playerid && GetPVarInt(playerid, "DenDichXuongXe") == 0)
- {
- // new vehicleid = GetPlayerVehicleID(playerid);
- new lights,alarm,bonnet,objective;
- new Float:vehx, Float:vehy, Float:vehz;
- SetPVarInt(playerid, "XePizza",vehicleid);
- SetVehiclePos(vehicleid, vehx, vehy, vehz);
- SetVehiclePos(vehicleid, vehx, vehy, vehz);
- SetVehicleParamsEx(GetPVarInt(playerid, "XePizza"),VEHICLE_PARAMS_OFF,lights,alarm,1,bonnet,0,objective);
- RemovePlayerFromVehicle(playerid);
- GameTextForPlayer(playerid, "~w~An nut ~r~Y~w~ de lay banh.", 6000, 5);
- SetPVarInt(playerid, "DenDichXuongXe", 1);
- return 1;
- }
- }
- - Tìm tiếp dòng if(GetPVarType(playerid, "Pizza") && !(IsAPizzaCar(vehicleid)))
- if(GetPVarInt(playerid, "Pizza"))
- {
- if(!IsAPizzaCar(vehicleid) && GetPVarInt(playerid, "DenDichXuongXe") == 0)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.3);
- PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
- RemovePlayerFromVehicle(playerid);
- SendClientMessageEx(playerid, COLOR_GRAD2, "Ban can o PizzaBoy khi cung cap banh pizza!");
- return 1;
- }
- }
- - Tìm tiếp dòng Pizza Delivery
- if(GetPVarInt(playerid, "Pizza") > 0 && IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorX], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorY], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorZ]) && GetPlayerInterior(playerid) == HouseInfo[GetPVarInt(playerid, "Pizza")][hExtIW] && GetPlayerVirtualWorld(playerid) == HouseInfo[GetPVarInt(playerid, "Pizza")][hExtVW])
- {
- new string[128],lights,alarms,bonnet,objective;
- if (GetPVarInt(playerid, "tpPizzaTimer") != 0)
- {
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport pizzarunning.", GetPlayerNameEx(playerid), playerid);
- ABroadCast( COLOR_YELLOW, string, 2 );
- // format(string, sizeof(string), "%s (ID %d) is possibly teleport pizzarunning.", GetPlayerNameEx(playerid), playerid);
- // Log("logs/hack.log",string);
- }
- format(string, sizeof(string), "Ban da giao banh pizza thanh cong! Ban nhan duoc $%d.", (GetPVarInt(playerid, "pizzaTimer") * 70));
- Misc_Save();
- GivePlayerCash(playerid, floatround((GetPVarInt(playerid, "pizzaTimer") * 70), floatround_round));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- DeletePVar(playerid, "Pizza");
- DisablePlayerCheckPoint(playerid);
- RemovePlayerAttachedObject(playerid, 0);
- SetVehicleParamsEx(GetPVarInt(playerid, "XePizza"),VEHICLE_PARAMS_OFF,lights,alarm,0,bonnet,0,objective);
- DeletePVar(playerid, "Pizza");
- DeletePVar(playerid, "DaLayBanh");
- DeletePVar(playerid, "XePizza");
- DeletePVar(playerid, "DenDichXuongXe");
- }
- - Tìm tiếp cmd:laybanh
- - Ở đây mình làm bánh /lqybanh LS, các bạn lấy ý rồi add nhé.
- cmd:laybanh(playerid, params[])
- {
- if(PlayeridInfo[playerid][pJob] == 21 || PlayerInfo[playerid][pJob2] == 21)
- {
- if(!GetPVarType(playerid, "Pizza"))
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 2092.5635, -1802.7292, 13.5488))
- {
- if(GetPlayerSkin(playerid) != 155)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "Ban khong mac quan ao Pizza Boy khong the lam viec.");
- return 1;
- }
- if(!IsAPizzaCar(GetPlayerVehicleID(playerid)))
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "Ban khong chay Pizza Stack khong the lam viec.");
- return 1;
- }
- new rand = random(30);
- while(!(HouseInfo[rand][hExteriorZ] <= 100 && HouseInfo[rand][hExteriorX] > 159.6704 && HouseInfo[rand][hExteriorX] < 2881.3550 && HouseInfo[rand][hExteriorY] < - 1221.3380 && HouseInfo[rand][hExteriorY] > -1766.5830)) {
- if(++rand >= 30) {
- rand = 1;
- }
- }
- new
- iDist = floatround(GetPlayerDistanceFromPoint(playerid, HouseInfo[rand][hExteriorX], HouseInfo[rand][hExteriorY], HouseInfo[rand][hExteriorZ])),
- szMessage[512];
- 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);
- SetPVarInt(playerid, "DaLayBanh", 1);
- format(szMessage, sizeof(szMessage), "Ban da nhan duoc banh Pizza va giao cho %s. Ban co %d giay de thuc hien!", StripUnderscore(HouseInfo[rand][hOwnerName]), iDist / 10);
- SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
- SetPlayerCheckPoint(playerid, HouseInfo[rand][hExteriorX], HouseInfo[rand][hExteriorY], HouseInfo[rand][hExteriorZ], 5);
- }
- }
- else return SendClientMessageEx(playerid, COLOR_WHITE,"Ban dang cung cap pizza.");
- }
- else return SendClientMessageEx(playerid, COLOR_WHITE,"Ban phai o tren xe de lay banh.");
- }
- else return SendClientMessageEx(playerid, COLOR_WHITE,"Ban khong phai la PizzaBoy.");
- return 1;
- }
- - Tìm tiếp dòng OnPlayerKeyStateChange
- if(newkeys & KEY_YES && GetPVarInt(playerid, "DaLayBanh") == 1)
- {
- if(IsPlayerInRangeOfPoint(playerid, 20.0, HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorX], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorY], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorZ]))
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerSkin(playerid) == 155)
- {
- SetPlayerAttachedObject(playerid, 0, 1582, 5, 0.219000, 0.000000, 0.145000, -82.599922, 0.000000, 102.000038, 1.000000, 1.000000, 1.000000, 0, 0);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
- SendClientMessageEx(playerid, COLOR_GRAD1,"He Thong: Hay xuong xe va su dung nut Y de lay banh ra khoi xe.");
- SetPVarInt(playerid,"DaLayBanh", 2);
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1:"He Thong: Ban khong mac trang phuc cua nguoi dua banh.");
- }
- }
- else return SendClientMessageEx(playerid, COLOR_GRAD1:"He Thong: Ban can phai xuong xe moi co the lay banh ra xe.");
- }
- else return SendClientMessageEx(playerid, COLOR_GRAD1:"He Thong: Ban can phai trong khoang cach 20 met voi muc tieu giao Pizza de lay banh.");
- }
- - Lưu ý, mình không làm Filescipt nhé, add thẳng vào Model nhé.
- - Chúc các bạn thành công.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement