lol its marvellous how easy it is to impress "not so good" scritpers with macros XD (no offense)
@Blastervirus
You never called the public PirateShipScoreUpdate so it couldnt work
Now here again the same (copied from Extremo's posted pastebin link)
Just with the Timer at OnGameModeInit which calls each second PirateShipScoreUpdate
pawn Код:
#define fpublic%1(%2) forward%1(%2); public%1(%2)
pawn Код:
//OnGameModeInit
SetTimer(#PirateShipScoreUpdate, 1000, true);
pawn Код:
fpublic PirateShipScoreUpdate()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
PayPlayerInArea(i, 1995.5, 1518.0, 2006.0, 1569.0, 200);
PayPlayerInArea(i, 1516.1332, -1380.5281, 1568.4066, -1336.3019, 200);
PayPlayerInArea(i, -1988.4744, 639.1348, -1917.0579, 715.5820, 200);
}
}
pawn Код:
fpublic PayPlayerInArea(playerID, Float:x1, Float:y1, Float:x2, Float:y2, cash)
{
if(IsPlayerConnected(playerID))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerID, X, Y, Z);
if(X >= x1 && X <= x2 && Y >= y1 && Y <= y2)
return GivePlayerMoney(playerID, cash);
}
return false;
}