Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Made by lokii.
- //credits to samp team for samp.
- #include <a_samp>
- #include <zcmd> //credits to zeex.
- static bool:explosive[MAX_PLAYERS char] = {false,...};
- public OnPlayerDisconnect(playerid, reason)
- {
- explosive{playerid} = false;
- return 1;
- }
- CMD:expbullets(playerid)
- {
- static weapon, ammo;
- GetPlayerWeaponData(playerid, 5, weapon, ammo);
- if(weapon != 31)
- {
- SendClientMessage(playerid, 0xFF0000FF, "Only M4 support explosive bullets");
- }
- else
- {
- if(!explosive{playerid})
- {
- SendClientMessage(playerid, 0xFFFF00FF, "Explosive bullets on");
- explosive{playerid} = true;
- }
- else
- {
- SendClientMessage(playerid, 0xFFFF00FF, "Explosive bullets off");
- explosive{playerid} = false;
- }
- }
- return 1;
- }
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- if(weaponid == 31 && explosive{playerid})
- {
- CreateExplosion(fX, fY, fZ, 12, 5.0);
- }
- return 1;
- }
- //EOF.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement