08.04.2011, 11:57
I've done it like this now
And it works.
Can anyone make me a code, when a player types /base, he will randomly set to a team with
SetPlayerTeam(i, ...)
I've done some ways and I failed
pawn Код:
COMMAND:base(playerid, params[])
{
if(BaseOn == 0) return SendClientMessage(playerid, Red, "There is no base in progress, or the base has already started");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new rand = random(sizeof(RandomSpawn));
SetPlayerInterior(i, 15);
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
GivePlayerWeapon(i, 24, 500);
GivePlayerWeapon(i, 31, 500);
GivePlayerWeapon(i, 34, 500);
}
}
return 1;
}
Can anyone make me a code, when a player types /base, he will randomly set to a team with
SetPlayerTeam(i, ...)
I've done some ways and I failed