16.06.2009, 19:17
if I understand you correctly:
Now, here's an example of using gTeam to check what team a player is in
That will check if the player team is the TEAM_POLICE.
And this would be the timer:
pawn Код:
//to make the team defines, at top of script
#define TEAM_POLICE 0
#define TEAM_TERRORIST 1
#define TEAM_MEDIC 2
new gTeam[MAX_PLAYERS]; //will be the variable to check if the player is to a certain team
pawn Код:
if(gTeam[playerid] == TEAM_POLICE)
{
SetPlayerColor(playerid, colorhere);
}
And this would be the timer:
pawn Код:
//top of script after #include <a_samp>
forward GiveCash();
//OnGameModeInit()
SetTimer("GiveCash", 120000, 1);
//Somewhere after main()
public GiveCash()
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
GivePlayerMoney(i, 1000);
}
}

