Prevent Spawning
#5

Nope, just the onplayerspawn teamcount, the requestclass and SetPlayerTeamFromClass

Edit:
I just used OnPlayerRequestSpawn, and it kinda works. Just now i got a problem.
When i try to spawn with the class, it suceeds, and it says "Team is full"
But now i made a different team, with the same codes, but now the MaxPlayers of that team is 10
No one joined that team, and when i try to spawn as that team, it says "Team is full".

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(Team1Count > MAXTEAM1)
    {
        GameTextForPlayer(playerid, "~r~Team is full~y~!", 1000, 3);
        return 0;
    }
    if(Team2Count > MAXTEAM2)
    {
        GameTextForPlayer(playerid, "~r~Team is full~y~!", 1000, 3);
        return 0;
    }
    if(Team1Count < MAXTEAM1)
    {
        return 1;
    }
    if(Team2Count < MAXTEAM2)
    {
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Prevent Spawning - by Wesley221 - 20.06.2011, 15:37
Re: Prevent Spawning - by Alvord - 20.06.2011, 15:52
Re: Prevent Spawning - by Wesley221 - 20.06.2011, 16:22
Re: Prevent Spawning - by Alvord - 20.06.2011, 16:48
Re: Prevent Spawning - by Wesley221 - 20.06.2011, 16:50
Re: Prevent Spawning - by Steven82 - 20.06.2011, 17:08
Re: Prevent Spawning - by Wesley221 - 20.06.2011, 17:29
Re: Prevent Spawning - by Wesley221 - 20.06.2011, 22:31
Re: Prevent Spawning - by =WoR=Varth - 20.06.2011, 22:36
Re: Prevent Spawning - by Wesley221 - 21.06.2011, 09:16

Forum Jump:


Users browsing this thread: 2 Guest(s)