public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
return true;
}
OnPlayerWeaponShot или есть fs которые юзают подобные функции или инклуды ?
|
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype != BULLET_HIT_TYPE_NONE)
{
if((fX <= -1000.0 || fX >= 1000.0) || (fY <= -1000.0 || fY >= 1000.0) || (fZ <= -1000.0 || fZ >= 1000.0) || ((hittype != BULLET_HIT_TYPE_PLAYER) && (hittype != BULLET_HIT_TYPE_VEHICLE) && (hittype != BULLET_HIT_TYPE_OBJECT) && (hittype != BULLET_HIT_TYPE_PLAYER_OBJECT)))
{
Kick(playerid);
return 0;
}
}
TimeNumberShotTarget[playerid]++;
TimeNumberShot[playerid]++;
if(weaponid == 17 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
foreach(i)
{
if(!IsPlayerConnected(i) || !IsPlayerInRangeOfPoint(i,10.0, fX, fY, fZ)) continue;
ApplyAnimation(i, "ped", "gas_cwr", 6.0, 0, 1, 1, 1, 0);
}
}
if(weaponid != 38)
{
if((gettime() - shotTime[playerid]) < 1)
{
shot[playerid]+=1;
}
else
{
shot[playerid]=0;
}
if(shot[playerid] > 10)
{
if(PTEMP[playerid][pAdmin] > 2) return true;
format(string, 90, "<Warning> %s[%i] Возможно чит на оружие", PTEMP[playerid][pName], playerid);
ABroadCast(COLOR_REDD,string,2);
CheatKick(playerid,1111);
}
shotTime[playerid] = gettime();
}
if(hittype == 1)
{
SERIU[playerid][SShout][0]++;
SERIU[playerid][SShout][1]++;
SERIU[playerid][SShout][2]++;
SERIU[playerid][SShout][3]++;
}
return true;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
/*if(issuerid != INVALID_PLAYER_ID)
{
new string[128], victim[MAX_PLAYER_NAME], attacker[MAX_PLAYER_NAME];
new weaponname[24];
GetPlayerName(playerid, victim, sizeof (victim));
GetPlayerName(issuerid, attacker, sizeof (attacker));
GetWeaponName(weaponid, weaponname, sizeof (weaponname));
format(string, sizeof(string), "%s ïîâðåäèë íà %.0f çäîðîâüÿ %s, îðóæèå: %s", attacker, amount, victim, weaponname);
SendClientMessageToAll(0xFFFFFFFF, string);
}*/
if(Convoi[playerid] != 9999)
{
new Float:HP;
GetPlayerHealth(playerid,HP);
SetPlayerHealthAC(playerid,HP);
}
if(weaponid == 24 || weaponid == 25)
{
if(!IsACop(issuerid)) return true;
if(NewTazer[issuerid] != true) return true;
if(PlayerCuffed[playerid] == 2) return true;
if(PlayerCuffed[playerid] == 1)
{
new Float:Health;
GetPlayerHealth(playerid,Health);
return SetPlayerHealthAC(playerid,Health);
}
new Float:Health;
GetPlayerHealth(playerid,Health);
SetPlayerHealthAC(playerid,Health);
ApplyAnimation(playerid,"PED","KO_skid_front",6.0,0,1,1,1,0);
PlayerCuffed[playerid] = 1;
PlayerCuffedTime[playerid] = 10;
GameTextForPlayer(playerid,"~r~freeze", 5000, 3);
}
return true;
}
if(weaponid == 17 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
foreach(i)
{
if(!IsPlayerConnected(i) || !IsPlayerInRangeOfPoint(i,10.0, fX, fY, fZ)) continue;
ApplyAnimation(i, "ped", "gas_cwr", 6.0, 0, 1, 1, 1, 0);
}
}
if(!IsACop(issuerid)) return true;
if(NewTazer[issuerid] != true) return true;
if(PlayerCuffed[playerid] == 2) return true;
if(!IsACop(issuerid) || NewTazer[issuerid] != true || PlayerCuffed[playerid] == 2) return true;
и не только это