Advertisement
Lirbo

Untitled

Feb 1st, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. forward C4Delay(playerid); // למעלה במוד
  2. new Float:bombpos[5][MAX_PLAYERS]; // למעלה במוד
  3. new bool:Planted[MAX_PLAYERS]; // למעלה במוד
  4. new MyBomb[MAX_PLAYERS]; // למעלה במוד
  5.  
  6. CMD:c4(playerid,params[]){
  7. if(Planted[playerid]) return SendClientMessage(playerid,0xFF0000FF,"You cannot use this command yet.");
  8. GetPlayerPos(playerid,bombpos[0][playerid],bombpos[1][playerid],bombpos[2][playerid]);
  9. MyBomb[playerid] = CreateObject(1252,bombpos[0][playerid],bombpos[1][playerid],bombpos[2][playerid],0, 0, 0);
  10. SendClientMessage(playerid,0xFF0000FF,"[C4] The bomb has been planted and will be exploded in 10 seconds!");
  11. Planted[playerid] = true;
  12. SetTimerEx(playerid,"C4Delay", 10000, false, "d", 1);
  13. return 1;}
  14.  
  15. Public C4Delay(playerid)
  16. {
  17. CreateExplosion(bombpos[0][playerid],bombpos[1][playerid],bombpos[2][playerid], 2, 10.0);
  18. Planted[playerid] = false;
  19. DestroyObject(MyBomb);
  20. return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement