Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward C4Delay(playerid); // למעלה במוד
- new Float:bombpos[5][MAX_PLAYERS]; // למעלה במוד
- new bool:Planted[MAX_PLAYERS]; // למעלה במוד
- new MyBomb[MAX_PLAYERS]; // למעלה במוד
- CMD:c4(playerid,params[]){
- if(Planted[playerid]) return SendClientMessage(playerid,0xFF0000FF,"You cannot use this command yet.");
- GetPlayerPos(playerid,bombpos[0][playerid],bombpos[1][playerid],bombpos[2][playerid]);
- MyBomb[playerid] = CreateObject(1252,bombpos[0][playerid],bombpos[1][playerid],bombpos[2][playerid],0, 0, 0);
- SendClientMessage(playerid,0xFF0000FF,"[C4] The bomb has been planted and will be exploded in 10 seconds!");
- Planted[playerid] = true;
- SetTimerEx(playerid,"C4Delay", 10000, false, "d", 1);
- return 1;}
- Public C4Delay(playerid)
- {
- CreateExplosion(bombpos[0][playerid],bombpos[1][playerid],bombpos[2][playerid], 2, 10.0);
- Planted[playerid] = false;
- DestroyObject(MyBomb);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement