SA-MP Forums Archive
Help me fix this for it to load IsACop - 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: Help me fix this for it to load IsACop (/showthread.php?tid=658754)



Help me fix this for it to load IsACop - linhpro200294 - 11.09.2018

hi, i did this isacop when i made the FS section but it does not load, you know fix for me.

Code error:
Quote:

C:\Users\Administrator\Desktop\PE-RP\filterscripts\siren.pwn(93) : error 017: undefined symbol "IsACop"

code :
Quote:

if (IsACop(playerid)
{
return SendClientMessage(playerid, -1, "Ban khong phai la canh sat");
}




Re: Help me fix this for it to load IsACop - solstice_ - 11.09.2018

You haven't defined IsACop, do you have a faction system on your gamemode? If yes, tell me. I'll explain to you how do you create IsACop.


Re: Help me fix this for it to load IsACop - akib - 11.09.2018

First of all, close your first bracket,
PHP код:
if (IsACop(playerid)) //<missing this last bracket close
{
return 
SendClientMessage(playerid, -1"Ban khong phai la canh sat");

Second, you might not defined IsACop function,
Like this,
PHP код:
IsACop(playerid){
    if(
sInfo[playerid][faction]==Police// sInfo[playerid][faction]==Police is my variable, replace it with yours
    
{
        return 
1;
    }
    return 
0;




Re: Help me fix this for it to load IsACop - solstice_ - 11.09.2018

Quote:
Originally Posted by akib
if(sInfo[playerid][faction]==Police)
Why not explain it better? What if he has a totally different faction system than yours?
Although if you're looking for reputations tell me I'll rep you for free, just try to explain it to them and not post random code


Re: Help me fix this for it to load IsACop - linhpro200294 - 11.09.2018

thanks very much