public OnPlayerRequestClass(playerid,classid) { SetPlayerTeamFromClass(playerid,classid); } |
error 017: undefined symbol "SetPlayerTeamFromClass" |
#define TEAM_GROVE 1 //This defines your teams
#define TEAM_BALLA 2 // this means that your not going to use the teams ID's , only TEAM_BALLA.
new gTeam[MAX_PLAYERS];
SetPlayerTeamFromClass(playerid,classid); // This sets the palyer team from class
{
if (classid == 0) //This checks the class ID
{
gTeam[playerid] = TEAM_GROVE; //and this sets the player team
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
#include <a_samp> #define TEAM_GROVE 1 #define TEAM_BALLAS 2 #define TEAM_VAGOS 3 #define TEAM_ARMY 4 #define TEAM_AIRPORT 5 #define TEAM_COPS 6 #define TEAM_LSGOVERNMENT 7 #define TEAM_DANANGBOYS 8 #define TEAM_BIKERS 9 #define TEAM_GOLFERS 10 #define TEAM_GROVE_COLOR 0x00FF00AA #define TEAM_BALLAS_COLOR 0xFF00FFAA #define TEAM_VAGOS_COLOR 0xFFFF00AA #define TEAM_AMRY_COLOR 0xAFAFAFAA #define TEAM_AIRPORT_COLOR 0x33CCFFAA #define TEAM_COPS_COLOR 0x0000BBAA #define TEAM_LSGOVERNMENT_COLOR 0xFFFFFFAA #define TEAM_DANANGBOYS_COLOR 0xFF4500AA #define TEAM_BIKERS_COLOR 0xAA3333AA #define TEAM_GOLFERS_COLOR 0x9ACD32AA #if defined FILTERSCRIPT new gTeam[MAX_PLAYERS]; SetPlayerTeamFromClass(playerid, classid) { if (classid == 0) { gTeam[playerid] = TEAM_GROVE; } if (classid == 1) { gTeam[playerid] = TEAM_BALLA; } if (classid == 2) { gTeam[playerid] = TEAM_VAGOS; } if (classid == 3) { gTeam[playerid] = TEAM_ARMY } if (classid == 4) { gTeam[playerid] = TEAM_AIRPORT } if (classid == 5) { gTeam[playerid] = TEAM_COPS } |
#include <a_samp>
#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3
#define TEAM_ARMY 4
#define TEAM_AIRPORT 5
#define TEAM_COPS 6
#define TEAM_LSGOVERNMENT 7
#define TEAM_DANANGBOYS 8
#define TEAM_BIKERS 9
#define TEAM_GOLFERS 10
#define TEAM_GROVE_COLOR 0x00FF00AA
#define TEAM_BALLAS_COLOR 0xFF00FFAA
#define TEAM_VAGOS_COLOR 0xFFFF00AA
#define TEAM_AMRY_COLOR 0xAFAFAFAA
#define TEAM_AIRPORT_COLOR 0x33CCFFAA
#define TEAM_COPS_COLOR 0x0000BBAA
#define TEAM_LSGOVERNMENT_COLOR 0xFFFFFFAA
#define TEAM_DANANGBOYS_COLOR 0xFF4500AA
#define TEAM_BIKERS_COLOR 0xAA3333AA
#define TEAM_GOLFERS_COLOR 0x9ACD32AA
new gTeam[MAX_PLAYERS];
#if defined FILTERSCRIPT
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid,classid);
}
public OnPlayerSpawn(playerid, classid)
{
SetPlayerToTeamColour(playerid);
}
//at the end of the script
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0) //0 = to your first class that you made..
{
gTeam[playerid] = TEAM_GROVE;
}
if (classid == 1)//1 = to the second class that you made..
{
gTeam[playerid] = TEAM_BALLA;
}
if (classid == 2)
{
gTeam[playerid] = TEAM_VAGOS;
}
if (classid == 3)
{
gTeam[playerid] = TEAM_ARMY
}
if (classid == 4)
{
gTeam[playerid] = TEAM_AIRPORT
}
if (classid == 5)
{
gTeam[playerid] = TEAM_COPS
}
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerColor(playerid,TEAM_COPS_COLOR);
}
if(gTeam[playerid] == TEAM_AIRPORT)
{
SetPlayerColor(playerid,TEAM_AIRPORT_COLOR);
}
SetPlayerTeamFromClass(playerid, classid)
{
gTeam[playerid] = classid + 1;
}