[HELP]Creating Teams on Class selections,with names and COLORS - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]Creating Teams on Class selections,with names and COLORS (
/showthread.php?tid=283588)
[HELP]Creating Teams on Class selections,with names and COLORS -
Issam - 15.09.2011
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!!
Re: [HELP]Creating Teams on Class selections,with names and COLORS -
[MWR]Blood - 15.09.2011
http://forum.sa-mp.com/search.php?searchid=3078634
https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch
Re: [HELP]Creating Teams on Class selections,with names and COLORS -
Blunt - 15.09.2011
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;
}
Re: [HELP]Creating Teams on Class selections,with names and COLORS -
Mean - 15.09.2011
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;
}