#include <a_samp>
#include <zcmd>
#define msg SendClientMessage
#define COLOR_ORANGE 0xFF9933AA
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" C4 Script By.: Nasika\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
new c4[MAX_PLAYERS] = 0;
new bool:c4lerakva[MAX_PLAYERS] = false;
new Float:c4x[MAX_PLAYERS],Float:c4y[MAX_PLAYERS],Float:c4z[MAX_PLAYERS];
new c4o[MAX_PLAYERS];
CMD:c4(playerid,params[])
{
msg(playerid,COLOR_ORANGE,\"3db c4-et kaptál!\");
c4[playerid] = 3;
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_SECONDARY_ATTACK))
{
if(c4[playerid] == 0) return msg(playerid,COLOR_ORANGE,\"Nincs C4-ed!\");
if(c4lerakva[playerid] == false)
{
msg(playerid,COLOR_ORANGE,\"Letetted a C4-et, ugyan úgy F-el robbantod!\");
GetPlayerPos(playerid,c4x[playerid],c4y[playerid],c4z[playerid]);
c4lerakva[playerid] = true;
c4o[playerid] = CreateObject(1654,c4x[playerid],c4y[playerid],c4z[playerid]-0.7,0,0,0);
}
else
{
msg(playerid,COLOR_ORANGE,\"C4-ed felrobbantva!\");
CreateExplosion(c4x[playerid], c4y[playerid], c4z[playerid], 0, 5.0);
c4lerakva[playerid] = false;
c4[playerid] --;
DestroyObject(c4o[playerid]);
}
}
return 1;
}
Letöltés: (pwn & amx)
http://www.solidfiles.com/d/c7f05ca47e/