Team System
#1

Hey guys.. I wanna make a Team System but for RP server..
Basically when someone registers.. They'll be asked stuff like which team do you want..

I know how to do that.. #define TEAM_AMERICA #define TEAM_RUSSIA etc..
But how do i make it appear in /stats? Like Team: %s?
Reply
#2

This is the way i do it for my jobs in my script, these require to be in the player enum but don't need to be saved on disconnect.

pawn Код:
stock Change(playerid) // Change 'Change' to the name you will use in the /stats
{
    new team[30];
    switch(PlayerInfo[playerid][pChange]) // Switch it to be with your team system
    {
        case 0: team = "TEAM 1"; // These all will be the name as the team start with team 0 and work up
        case 1: team = "TEAM 2";
        case 2: team = "TEAM 3";
        case 3: team = "TEAM 4";
    }
    return team;
}
For the stats command.

pawn Код:
format(coordsstring, sizeof(coordsstring), "Team: %s\n", Change(playerid)); // Change 'Change' to the word you used in the stock ((stock 'word'(playerid)
    strcat(string2,coordsstring);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)