23.07.2014, 15:26
Hello, i've made a shooting gun in public.
its not working when players shots. please check this?
its not working when players shots. please check this?
PHP код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new string[256];
if(PlayerInfo[playerid][pSpawn] == 1 && PlayerInfo[playerid][pShootingTime] <= 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pAJailed] == 0)
{
if(PlayerInfo[playerid][pTeam] != TEAM_LAW && PlayerInfo[playerid][pVigilante] == 0)
{
if(IsSuspectInRangeOfPolice1(playerid) && !IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pWantedLevel] >= 6)PlayerInfo[playerid][pWantedLevel]++;else PlayerInfo[playerid][pWantedLevel] =6;
SetPlayerWantedStats(playerid,"Shooting Gun In Public");
format(string, sizeof(string), "Crime: Shooting Gun In Public");
ReportCrimeTOPolice(playerid,string);
PlayerInfo[playerid][pShootingTime] =20;
}
}
}
return 1;
}