SA-MP Forums Archive
Undefined symbol: "SetPlayerToTeamColour" - 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: Undefined symbol: "SetPlayerToTeamColour" (/showthread.php?tid=417641)



Undefined symbol: "SetPlayerToTeamColour" - iHaze. - 22.02.2013

Hey, I've got an error while setting up teams for a gang war gamemode, It's undefined symbol, And i can't find a define for it, I got the teams setting up from a tutorial, It's not saying anything about SetPlayerToTeamColour.

Any help please? :'$


Re: Undefined symbol: "SetPlayerToTeamColour" - Jewell - 22.02.2013

it's not a samp function. You have to create it manually.

like this. but remember to define teams and colors
pawn Код:
forward SetPlayerToTeamColour(playerid);
public SetPlayerToTeamColour(playerid)
{
    if(gTeam[playerid] == TEAM_1)
    {
        SetPlayerColor(playerid,TEAM_1_COLOR);
    }
    if(gTeam[playerid] == TEAM_2)
    {
        SetPlayerColor(playerid,TEAM_2_COLOR);
    }
    if(gTeam[playerid] == TEAM_3)
    {
        SetPlayerColor(playerid,TEAM_3_COLOR);
    }
    if(gTeam[playerid] == TEAM_4)
    {
        SetPlayerColor(playerid,TEAM_4_COLOR);
    }
   
    return 1;
}



Re: Undefined symbol: "SetPlayerToTeamColour" - iHaze. - 22.02.2013

Quote:
Originally Posted by Jewell
Посмотреть сообщение
it's not a samp function. You have to create it manually.

like this. but remember to define teams and colors
pawn Код:
forward SetPlayerToTeamColour(playerid);
public SetPlayerToTeamColour(playerid)
{
    if(gTeam[playerid] == TEAM_1)
    {
        SetPlayerColor(playerid,TEAM_1_COLOR);
    }
    if(gTeam[playerid] == TEAM_2)
    {
        SetPlayerColor(playerid,TEAM_2_COLOR);
    }
    if(gTeam[playerid] == TEAM_3)
    {
        SetPlayerColor(playerid,TEAM_3_COLOR);
    }
    if(gTeam[playerid] == TEAM_4)
    {
        SetPlayerColor(playerid,TEAM_4_COLOR);
    }
   
    return 1;
}
Thanks, Worked