What is this ?
#1

So what is wrong with this errors or what




pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(IgracPolicajac(issuerid))
    {
        if(GetPlayerWeapon(issuerid) == 23)
        {
            new str[128];
            if(PI[playerid][TrazeniNivo] == 0) return SCM(issuerid, GREY, "Taj igrac nema wanted level.");
            if(IgracPolicajac(playerid)) return SCM(issuerid, GREY, "Ne mozes tazovati clana PD/FBI.");
            if(PI[issuerid][Rank] == 0) return SCM(issuerid, GREY, "Vi ste suspendovani sa duznosti.");
            if(AdminDuznost[playerid] == 1) return SCM(issuerid, GREY, "Taj igrac je Admin na duznosti.");
            format(str, sizeof(str), "%s puca tazerom na %s-a i pogadja ga.", ImeIgraca(issuerid) ,ImeIgraca(playerid));
            ProxDetector(20.0, issuerid, str, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
            TogglePlayerControllable(playerid, 0); IgracTazovan[playerid] = 1;
            ApplyPlayerAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
            SetTimerEx("TazerTimer", 10000, false, "i", playerid);
        }
    }
    return 1;
}
Reply
#2

cause issuerid is invalid player id ( 65535 / 0xFFFF )

try this :
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(IgracPolicajac(issuerid))
        {
            if(GetPlayerWeapon(issuerid) == 23)
            {
                new str[128];
                if(PI[playerid][TrazeniNivo] == 0) return SCM(issuerid, GREY, "Taj igrac nema wanted level.");
                if(IgracPolicajac(playerid)) return SCM(issuerid, GREY, "Ne mozes tazovati clana PD/FBI.");
                if(PI[issuerid][Rank] == 0) return SCM(issuerid, GREY, "Vi ste suspendovani sa duznosti.");
                if(AdminDuznost[playerid] == 1) return SCM(issuerid, GREY, "Taj igrac je Admin na duznosti.");
                format(str, sizeof(str), "%s puca tazerom na %s-a i pogadja ga.", ImeIgraca(issuerid) ,ImeIgraca(playerid));
                ProxDetector(20.0, issuerid, str, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
                TogglePlayerControllable(playerid, 0); IgracTazovan[playerid] = 1;
                ApplyPlayerAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
                SetTimerEx("TazerTimer", 10000, false, "i", playerid);
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)