20.03.2009, 19:34
Alright I have added TEAM_GROVE and TEAM_BALLAS
All the things in the SAMP wiki tutorial (https://sampwiki.blast.hk/wiki/PAWN_tutorial) for adding teams, ballas and grove works perfect.
And now 1 thing, i have scripted Aztecas,vagos,army,LSPD for my TDM script, but how do I add them as teams? So that ppl who wear LSPD skins get Blue names, aztecas skins light blue, vagos yellow etc etc..
Can someone post some extra pawn codes? So I can in some way copy/paste..
Best regards,
Klutty.
pawn Код:
#define TEAM_GROVE 1
#define TEAM_BALLA 2
#define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green (in RGBA format)
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
new gTeam[MAX_PLAYERS];
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
pawn Код:
SetPlayerTeamFromClass(playerid, classid);
pawn Код:
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid, TEAM_GROVE_COLOR);
}
else if (gTeam[playerid] == TEAM_BALLA)
{
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
}
pawn Код:
SetPlayerToTeamColor(playerid);
pawn Код:
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
pawn Код:
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
pawn Код:
if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid, TEAM_GROVE_COLOR);
}
else if (gTeam[playerid] == TEAM_BALLA)
{
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
else
{
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
And now 1 thing, i have scripted Aztecas,vagos,army,LSPD for my TDM script, but how do I add them as teams? So that ppl who wear LSPD skins get Blue names, aztecas skins light blue, vagos yellow etc etc..
Can someone post some extra pawn codes? So I can in some way copy/paste..
Best regards,
Klutty.