ZoneAttacker [SIMPLE]
#1

Greetings,



Hi users, today I was making a Gang Zones system and War system, it`s all ok, but when I want to give score and money to the ZoneAttackers I get this 2 errors:

pawn Код:
C:\Users\usuario\Sa-Mp\filterscripts\ZonesAndWar.pwn(130) : error 035: argument type mismatch (argument 1)
C:\Users\usuario\Sa-Mp\filterscripts\ZonesAndWar.pwn(131) : error 035: argument type mismatch (argument 1)
And this is code:

pawn Код:
forward ZoneTimer();
public ZoneTimer()
{
    for(new i=0; i < sizeof(ZoneInfo); i++)
    {
        if(ZoneAttacker[i] != -1)
        {
            if(GetPlayersInZone(i, ZoneAttacker[i]) >= MIN_MEMBERS_TO_START_WAR)
            {
                ZoneAttackTime[i]++;
                if(ZoneAttackTime[i] == TAKEOVER_TIME)
                {
                    GangZoneStopFlashForAll(ZoneID[i]);
                    ZoneInfo[i][zTeam] = ZoneAttacker[i];
                    GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));                     ZoneAttacker[i] = -1;
                    SetPlayerScore(ZoneAttacker, GetPlayerScore(ZoneAttacker) + 5); //THIS LINE
                    GivePlayerMoney(ZoneAttacker, 10000); //THIS LINE
                }
            }
            else
            {
                GangZoneStopFlashForAll(ZoneID[i]);
                ZoneAttacker[i] = -1;
            }
        }
        else // check if somebody is attacking
        {
            for(new t=0; t < sizeof(Teams); t++)
            {
                if(Teams[t] != ZoneInfo[i][zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR)
                {
                    ZoneAttacker[i] = Teams[t];
                    ZoneAttackTime[i] = 0;
                    GangZoneFlashForAll(ZoneID[i], GetTeamZoneColor(ZoneAttacker[i]));
                }
            }
        }
    }
}

public OnPlayerSpawn(playerid)
{
    for(new i=0; i < sizeof(ZoneInfo); i++)
    {
        GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
    }
    for(new i=0; i < sizeof(ZoneInfo); i++)
    {
        GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
        if(ZoneAttacker[i] != -1) GangZoneFlashForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneAttacker[i]));
    }
    return 1;
}
If anyone can help me

Regards,
Pablo.
Reply
#2

pawn Код:
SetPlayerScore(i, GetPlayerScore(i) + 5); //THIS LINE
                    GivePlayerMoney(i, 10000); //THIS LINE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)