Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HTML]if(newkeys & KEY_YES)
- {
- new vehicleid = GetPlayerNearestVehicle(playerid);
- new model = GetVehicleModel(vehicleid);
- if(GetDistanceFromPlayerToVehicle(playerid, vehicleid) < 5.1) /// Loading Materials / lead
- {
- if(model == 499 || model == 456)
- {
- if(GetPVarInt(playerid, "GotDaMaterialsBro") == 1) // Storing metal in to the Trailer // pick pickaxe
- {
- if(vehicleMetal[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
- vehicleMetal[vehicleid] += 100;
- SetPVarInt(playerid, "GotDaMaterialsBro", 0);
- SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s, you have just stored 100 pieces of metal in to your trailer.", RPName(playerid));
- ClearAnimations(playerid);
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
- }
- if(GetPVarInt(playerid, "GotDaMaterialsBro") == 2) // Storing Lead in to the trailer
- {
- if(vehicleLead[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
- vehicleLead[vehicleid] += 100;
- SetPVarInt(playerid, "GotDaMaterialsBro", 0);
- SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s, you have just stored 100 pieces of lead in to your trailer.", RPName(playerid));
- ClearAnimations(playerid);
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
- }
- if(GetPVarInt(playerid, "GotDaMaterialsBro") == 3) // Storing both metal back inside trailer
- {
- if(vehicleLead[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
- vehicleMetal[vehicleid] += 100;
- SetPVarInt(playerid, "GotDaMaterialsBro", 0);
- Action(playerid, "places the box of metal back inside the trailer");
- ClearAnimations(playerid);
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
- }
- if(GetPVarInt(playerid, "GotDaMaterialsBro") == 4) // Storing both lead back inside trailer
- {
- if(vehicleLead[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
- vehicleLead[vehicleid] += 100;
- SetPVarInt(playerid, "GotDaMaterialsBro", 0);
- Action(playerid, "places the box of lead back inside the trailer");
- ClearAnimations(playerid);
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
- }
- }
- }[/HTML]
- [HTML]if(newkeys & KEY_NO)
- {
- new vehicleid = GetPlayerNearestVehicle(playerid);
- new model = GetVehicleModel(vehicleid);
- if(IsPlayerInRangeOfPoint(playerid, 4.0, 150.3020,1391.3124,10.5859))
- {
- if(!IsPlayerFED(playerid))
- {
- if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
- if(GetPVarInt(playerid, "GotDaMaterialsBro") > 0) return SendClientError(playerid, "You already have metal or lead on you");
- GivePlayerMoneyEx(playerid, -1250);
- SetPVarInt(playerid, "GotDaMaterialsBro", 1); // 1 Indicates Metal
- SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 100 metal pieces.",RPName(playerid));
- SetPlayerAttachedObject(playerid, 1, 12201, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- }
- else return SendClientError(playerid, "This is only for illegal factions");
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 571.8118,1220.7935,11.7113))
- {
- if(!IsPlayerFED(playerid))
- {
- if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
- if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
- GivePlayerMoneyEx(playerid, -1250);
- SetPVarInt(playerid, "GotDaMaterialsBro", 2); // 1 Indicates Metal
- SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 50 lead pieces.", RPName(playerid));
- SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- }
- else return SendClientError(playerid, "This is only for illegal factions");
- }
- if(GetDistanceFromPlayerToVehicle(playerid, vehicleid) < 5.1)
- {
- if(model == 499 || model == 456 || model == 414)
- {
- if(vehicleMetal[vehicleid] >= 100)
- {
- vehicleMetal[vehicleid] -= 100;
- Action(playerid, "takes a box of metal from the back of the trailer");
- if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 0) return SendClientError(playerid, "You already have metal or lead on you");
- SetPVarInt(playerid, "GotDaMaterialsBro", 3); // 3 Indicates metal
- SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- return 1;
- }
- else if(vehicleLead[vehicleid] >= 100)
- {
- if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
- vehicleLead[vehicleid] -= 100;
- Action(playerid, "takes a box of lead from the back of the trailer");
- SetPVarInt(playerid, "GotDaMaterialsBro", 4); // 4 Indicates lead
- SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- return 1;
- }
- else return SendClientError(playerid, "There needs to be atleast 100 lead or 100 metal inside your trailer.");
- }
- }
- }[/HTML]
- if(newkeys & KEY_NO)
- {
- new vehicleid = GetPlayerNearestVehicle(playerid);
- new model = GetVehicleModel(vehicleid);
- if(IsPlayerInRangeOfPoint(playerid, 4.0, 150.3020,1391.3124,10.5859))
- {
- if(!IsPlayerFED(playerid))
- {
- if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
- if(GetPVarInt(playerid, "GotDaMaterialsBro") > 0) return SendClientError(playerid, "You already have metal or lead on you");
- GivePlayerMoneyEx(playerid, -1250);
- SetPVarInt(playerid, "GotDaMaterialsBro", 1); // 1 Indicates Metal
- SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 100 metal pieces.",RPName(playerid));
- SetPlayerAttachedObject(playerid, 1, 12201, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- }
- else return SendClientError(playerid, "This is only for illegal factions");
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 571.8118,1220.7935,11.7113))
- {
- if(!IsPlayerFED(playerid))
- {
- if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
- if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
- GivePlayerMoneyEx(playerid, -1250);
- SetPVarInt(playerid, "GotDaMaterialsBro", 2); // 1 Indicates Metal
- SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 50 lead pieces.", RPName(playerid));
- SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- }
- else return SendClientError(playerid, "This is only for illegal factions");
- }
- if(GetDistanceFromPlayerToVehicle(playerid, vehicleid) < 5.1)
- {
- if(model == 499 || model == 456 || model == 414)
- {
- if(vehicleMetal[vehicleid] >= 100)
- {
- vehicleMetal[vehicleid] -= 100;
- Action(playerid, "takes a box of metal from the back of the trailer");
- if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 0) return SendClientError(playerid, "You already have metal or lead on you");
- SetPVarInt(playerid, "GotDaMaterialsBro", 3); // 3 Indicates metal
- SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- return 1;
- }
- else if(vehicleLead[vehicleid] >= 100)
- {
- if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
- vehicleLead[vehicleid] -= 100;
- Action(playerid, "takes a box of lead from the back of the trailer");
- SetPVarInt(playerid, "GotDaMaterialsBro", 4); // 4 Indicates lead
- SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- return 1;
- }
- else return SendClientError(playerid, "There needs to be atleast 100 lead or 100 metal inside your trailer.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment