ZoneAttacker [SIMPLE] - 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: ZoneAttacker [SIMPLE] (
/showthread.php?tid=466891)
ZoneAttacker [SIMPLE] -
PabloDiCostanzo - 29.09.2013
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.
Re: ZoneAttacker [SIMPLE] -
DanishHaq - 29.09.2013
pawn Код:
SetPlayerScore(i, GetPlayerScore(i) + 5); //THIS LINE
GivePlayerMoney(i, 10000); //THIS LINE