Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(new i = 0; i < pPlantedC4s[playerid]; i ++)
- {
- switch(pPlantedC4Type[playerid][i])
- {
- case C4_TYPE_SECURITY_VAN:
- {
- new names[30 * MAX_ROB_SECURITY_VAN_PLAYERS];
- for(new ii = 0, count; ii < MAX_ROB_SECURITY_VAN_PLAYERS; ii++)
- {
- new terroristid = gSecurityVanRobbers[ii];
- if(terroristid == INVALID_PLAYER_ID)
- {
- continue;
- }
- if(terroristid != playerid)
- {
- for(new iii = 0; iii < pPlantedC4s[terroristid]; iii++)
- {
- if(pPlantedC4Type[terroristid][iii] == C4_TYPE_SECURITY_VAN)
- {
- pPlantedC4Type[terroristid][iii] = C4_TYPE_NONE;
- pPlantedC4s[terroristid] --;
- }
- }
- }
- if(!count) {
- format(names, sizeof(names), "%s [%i]", ReturnPlayerName(terroristid), terroristid);
- }
- else if(count < (gSecurityVanRobberCount - 1)) {
- format(names, sizeof(names), "%s and %s [%i]", names, ReturnPlayerName(terroristid), terroristid);
- }
- else format(names, sizeof(names), "%s, %s [%i]", names, ReturnPlayerName(terroristid), terroristid);
- count++;
- }
- new string[144], npc_id = GetNPCIDFromName(NPC_SECURITY_GUARD_NAME), Float:x, Float:y, Float:z;
- GetVehiclePos(vhSecurityVanRobbery, x, y, z);
- CreateExplosion(x, y, z, 0, 50.0);
- SetVehicleVirtualWorld(vhSecurityVanRobbery, (VIRTUAL_WORLD_OFFSET_ID + npc_id));
- if(gSecurityVanPickup > -1) {
- DestroyDynamicPickup(gSecurityVanPickup);
- }
- gSecurityVanPickup = CreateDynamicPickup(1550, 1, x, y, (z - 0.5), -1, -1, -1, 100.0);
- format(string, sizeof(string), "%s has blown up a Security Van with C4.", names, playerid);
- SendMessageToAll(100, GetPlayerColor(playerid), string);
- }
- case C4_TYPE_GROUND:
- {
- new string[128];
- CreateExplosion(C4X, C4Y, C4Z, 6, 50.0);
- format(string, sizeof(string), "%s [%d] has blown up a C4 - %s.", ReturnPlayerName(playerid), playerid, GetPlayerLocation(playerid));
- SendMessageToAll(100, GetPlayerColor(playerid), string);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment