Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:pcb(playerid, params[])
- {
- if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
- {
- if(PlayerInfo[playerid][pC4] == 0)
- {
- if(PlayerInfo[playerid][pBombs] != 0)
- {
- new carid = GetPlayerVehicleID(playerid);
- new closestcar = GetClosestCar(playerid, carid);
- if(IsPlayerInRangeOfVehicle(playerid, closestcar, 4.0))
- {
- if(VehicleBomb{closestcar} == 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "There is already a C4 on the vehicle engine!");
- return 1;
- }
- VehicleBomb{closestcar} = 1;
- PlacedVehicleBomb[playerid] = closestcar;
- ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
- ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
- SendClientMessage(playerid, COLOR_GREEN, "You have placed C4 on the vehicle engine, /pickupbomb to remove it.");
- PlayerInfo[playerid][pC4] = 1;
- PlayerInfo[playerid][pBombs]--;
- PlayerInfo[playerid][pC4Used] = 2;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You're not close enough to any vehicle!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You do not have C4!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You can only deploy 1 C4 at a time ! ");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You're not a member of the International Contract Agency ! ");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement