01.12.2012, 21:25
Most basic way of teams with a command this wont save them though..
before your functions add
Defining the teams and then creating a variable to store them in.
Now on your OnPlayerCommandText add this
The last code is pretty self explanatory, Read it yourself and see why
before your functions add
pawn Код:
#define team_lspd 1
#define team_crook 2
new pTeam[MAX_PLAYERS];
Now on your OnPlayerCommandText add this
pawn Код:
if (strcmp("/cop", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, copcolor, "You are now a cop.");
pTeam[playerid] = team_cop;
SetPlayerSkin(playerid, 281);
GivePlayerWeapon(playerid, 3, 0);
}
Return 1;
}