Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- new bomba[MAX_PLAYERS];
- forward TimerExplozion(objectid, Float:x, Float:y, Float:z);
- CMD:cbomba(playerid,command[])
- {
- if(bomba[playerid] >= 5) return SendClientMessage(playerid, -1, "Ai atins limita de bombe. Folosestele.");
- bomba[playerid]++;
- GivePlayerMoney(playerid, -500);
- SendClientMessage(playerid, -1, "Ai cumparat o bomba pentru 500$.");
- return 1;
- }
- CMD:pbomba(playerid,command[])
- {
- new Float:x, Float:y, Float:z;
- if(bomba[playerid] == 0) return SendClientMessage(playerid, -1, "Nu ai nici o bomba. Foloseste /cbomba.");
- GetPlayerPos(playerid, x, y, z);
- bomba[playerid]--;
- new object = CreateObject(1252, x, y, z, 0.000, 0.000, 0.000);
- SetTimerEx("TimerExplozion", 10000, 0, "ifff", object, x,y,z);
- SendClientMessage(playerid, -1, "Ai plantat bomba. Fugi");
- return 1;
- }
- public TimerExplozion(objectid, Float:x, Float:y, Float:z)
- {
- CreateExplosion(x,y,z,2,30.0);
- DestroyObject(objectid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement