Small help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Small help (
/showthread.php?tid=581470)
Small help -
STONEGOLD - 13.07.2015
Well, It's working fine. But i want if player has wanted level 6 so it doesn't give msg and wanted level . I just want it shouldn't work for wanted level 6. WHo has 6 stars so its should don't work for them.
PHP код:
shotsfired[playerid] ++;
if(shotsfired[playerid] >= 2)
{
if(IsPlayerNearLawEnforcement(playerid))
{
new string[256], copmsg[256], ID;
SetPlayerWantedLevelEx(playerid, GetPlayerWantedLevel(playerid) + 1);
format(string, sizeof(string), "Comitted A Crime: Shooting in public - Wanted Level %d", GetPlayerWantedLevel(playerid));
SendClientMessage(playerid, COLOR_WANTED, string);
shotsfired[playerid] = 0;
}
}
Re: Small help -
TonyVk - 13.07.2015
Код:
shotsfired[playerid] ++;
if(shotsfired[playerid] >= 2)
{
if(IsPlayerNearLawEnforcement(playerid) && GetPlayerWantedLevel(playerid) < 6)
{
new string[256], copmsg[256], ID;
SetPlayerWantedLevelEx(playerid, GetPlayerWantedLevel(playerid) + 1);
format(string, sizeof(string), "Comitted A Crime: Shooting in public - Wanted Level %d", GetPlayerWantedLevel(playerid));
SendClientMessage(playerid, COLOR_WANTED, string);
shotsfired[playerid] = 0;
}
}