How To Separate Teams Using Skin ID's?
#1

closed.
Reply
#2

Building off of your previous topic/question:

pawn Код:
#include <a_samp>

new BlueTeamSkin,RedTeamSkin; //We Create Two Variables

#define BlueTeam 1
#define RedTeam 2
//when ever we type BlueTeam, the system reads it as 1
//when ever we type RedTeam, the system reads it as 2

public OnGameModeInit()
{
    BlueTeamSkin = AddPlayerClass(290.......); //Sets this skin as Blue Team Skin
    RedTeamSkin = AddPlayerClass(245.......); //Sets this skin as the Red Team Skin
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    switch (classid)
    {
         case BlueTeamSkin: //If the player chooses the blue team skin...
         {
              GameTextForPlayer(playerid, "~b~Blue Team", 1000, 4);
              SetPlayerTeam(playerid,BlueTeam); //Sets their team to BlueTeam(1)
         }
         case RedTeamSkin: //If the player chooses the red team skin...
         {
              GameTextForPlayer(playerid, "~r~Red Team", 1000, 4);
              SetPlayerTeam(playerid,RedTeam); //Sets their team to RedTeam(2)
         }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)