15.05.2014, 11:57
i am making an anti cbug,is there any way to detect it only if player shoots a player or a car?like if i shoot the air it doesnt do anything,if i shoot play it does the effect,how?
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
public OnPlayerUpdate(playerid)
{
new Keys,ud,lr;
GetPlayerKeys(playerid,Keys,ud,lr);
if(ud == KEY_UP) SendClientMessage(playerid, -1, "UP");
else if(ud == KEY_DOWN) SendClientMessage(playerid, -1, "DOWN");
if(lr == KEY_LEFT) SendClientMessage(playerid, -1, "LEFT");
else if(lr == KEY_RIGHT) SendClientMessage(playerid, -1, "RIGHT");
return 1;
}