[HELP]Creating Teams on Class selections,with names and COLORS
#1

Alright, can someone teach me how to create TWO Teams,atleast, each one have their OWN CameraPos and CameraLookAt, also when i start selecting,it should show for example
GROVE on the TOP of the skin, with a Green text
and
ARMY on the TOP of the skin ,with brown text
Show me please and get +1REP and much LOVE!!
Reply
#2

http://forum.sa-mp.com/search.php?searchid=3078634
https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch
Reply
#3

Uhh, Here..

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0)
    {
        SetPlayerPos(playerid, 2375.7463,-1645.9944,13.5322);
        SetPlayerCameraPos(playerid, 2375.9658,-1647.8722,13.5405);
        SetPlayerCameraLookAt(playerid, 2375.7463,-1645.9944,13.5322);
        GameTextForPlayer(playerid, "~g~EastSide Guerillas", 5000, 5);
        SetPlayerColor(playerid, 0x2D964DFF);
        SetPlayerFacingAngle(playerid, 180.000);
        ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerInterior(playerid, 0);
        LockedClass[playerid] = false;
        }
return 1;
}
Reply
#4

Quote:
Originally Posted by Blunt
Посмотреть сообщение
Uhh, Here..

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0)
    {
        SetPlayerPos(playerid, 2375.7463,-1645.9944,13.5322);
        SetPlayerCameraPos(playerid, 2375.9658,-1647.8722,13.5405);
        SetPlayerCameraLookAt(playerid, 2375.7463,-1645.9944,13.5322);
        GameTextForPlayer(playerid, "~g~EastSide Guerillas", 5000, 5);
        SetPlayerColor(playerid, 0x2D964DFF);
        SetPlayerFacingAngle(playerid, 180.000);
        ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerInterior(playerid, 0);
        LockedClass[playerid] = false;
        }
return 1;
}
*sigh*

Correct:
pawn Код:
// Define your teams...
#define TEAM_ONE 0
#define TEAM_TWO 1
// TEAM_THREE would be 2, FOUR 3, etc.

// Making the variable where the player team will be stored ...
static gTeam[ MAX_PLAYERS ];

public OnGameModeInit( ) {
    // AddPlayerClass code for team one.
    // AddPlayerClass code for team two.
    return 1;
}

public OnPlayerRequestClass( playerid, classid ) {
    if( classid == TEAM_ONE ) {
        // Set the player skin and color for team one.
        gTeam[ playerid ] = TEAM_ONE;
    }
    if( classid == TEAM_TWO ) {
        // Set the player skin and color for team two.
        gTeam[ playerid ] = TEAM_TWO;
    }
    // You don't have to set the skin if you set it in AddPlayerClass.
    return 1;
}

public OnPlayerSpawn( playerid ) {
    if( gTeam[ playerid ] == TEAM_ONE ) {
        // Give weapons, cash, health, whatever for team one.
    }
    if( gTeam[ playerid ] == TEAM_TWO ) {
        // Give weapons, cash, health, whatever for team two.
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)