Mattaffix

Untitled

Dec 14th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. for(new i = 0; i < pPlantedC4s[playerid]; i ++)
  2. {
  3. switch(pPlantedC4Type[playerid][i])
  4. {
  5. case C4_TYPE_SECURITY_VAN:
  6. {
  7. new names[30 * MAX_ROB_SECURITY_VAN_PLAYERS];
  8. for(new ii = 0, count; ii < MAX_ROB_SECURITY_VAN_PLAYERS; ii++)
  9. {
  10. new terroristid = gSecurityVanRobbers[ii];
  11. if(terroristid == INVALID_PLAYER_ID)
  12. {
  13. continue;
  14. }
  15. if(terroristid != playerid)
  16. {
  17. for(new iii = 0; iii < pPlantedC4s[terroristid]; iii++)
  18. {
  19. if(pPlantedC4Type[terroristid][iii] == C4_TYPE_SECURITY_VAN)
  20. {
  21. pPlantedC4Type[terroristid][iii] = C4_TYPE_NONE;
  22. pPlantedC4s[terroristid] --;
  23. }
  24. }
  25. }
  26. if(!count) {
  27. format(names, sizeof(names), "%s [%i]", ReturnPlayerName(terroristid), terroristid);
  28. }
  29. else if(count < (gSecurityVanRobberCount - 1)) {
  30. format(names, sizeof(names), "%s and %s [%i]", names, ReturnPlayerName(terroristid), terroristid);
  31. }
  32. else format(names, sizeof(names), "%s, %s [%i]", names, ReturnPlayerName(terroristid), terroristid);
  33. count++;
  34. }
  35. new string[144], npc_id = GetNPCIDFromName(NPC_SECURITY_GUARD_NAME), Float:x, Float:y, Float:z;
  36. GetVehiclePos(vhSecurityVanRobbery, x, y, z);
  37.  
  38. CreateExplosion(x, y, z, 0, 50.0);
  39.  
  40. SetVehicleVirtualWorld(vhSecurityVanRobbery, (VIRTUAL_WORLD_OFFSET_ID + npc_id));
  41.  
  42. if(gSecurityVanPickup > -1) {
  43. DestroyDynamicPickup(gSecurityVanPickup);
  44. }
  45. gSecurityVanPickup = CreateDynamicPickup(1550, 1, x, y, (z - 0.5), -1, -1, -1, 100.0);
  46.  
  47. format(string, sizeof(string), "%s has blown up a Security Van with C4.", names, playerid);
  48. SendMessageToAll(100, GetPlayerColor(playerid), string);
  49. }
  50. case C4_TYPE_GROUND:
  51. {
  52. new string[128];
  53.  
  54. CreateExplosion(C4X, C4Y, C4Z, 6, 50.0);
  55.  
  56. format(string, sizeof(string), "%s [%d] has blown up a C4 - %s.", ReturnPlayerName(playerid), playerid, GetPlayerLocation(playerid));
  57. SendMessageToAll(100, GetPlayerColor(playerid), string);
  58. }
  59. }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment