Fix my little problem?
#1

The problem I have here is probably very simple to solve:
My error is:
warning 203: symbol is never used: "SetPlayerTeamFromClass"


pawn Код:
#include <a_samp>
new gTeam[MAX_PLAYERS];
//Teams
#define TEAM_GROVE 0
#define TEAM_BALLAS 1
#define TEAM_MEXICAN 2
#define TEAM_POLICE 3
//Colors
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_RED 0xAA3333AA
SetPlayerTeamFromClass(playerid, classid);

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0,2511.4180,-1688.6161,13.5544,48.5905,0,0,0,0,0,0); // grovespawn
    AddPlayerClass(0,2232.8372,-1155.8481,25.8906,133.0096,0,0,0,0,0,0); // ballaspos
    AddPlayerClass(0,2251.7834,-1030.1400,56.4139,227.2148,0,0,0,0,0,0); // mexicanpos
    AddPlayerClass(0,1567.7501,-1692.6176,5.8906,190.7581,0,0,0,0,0,0); // policepos
   
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
    {
    if(classid == 0)
    {
    gTeam[playerid] = TEAM_GROVE;
    return 1;
    }
    else if(classid == 1)
    {
    gTeam[playerid] = TEAM_BALLAS;
    return 1;
    }
    if(classid == 2)
    {
    gTeam[playerid] = TEAM_MEXICAN;
    return 1;
    }
    else if(classid == 3)
    {
    gTeam[playerid] = TEAM_POLICE;
    return 1;
}

    SetPlayerToTeamColor(playerid)
    {
    if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, COLOR_GREEN);
    }
    else if (gTeam[playerid] == TEAM_BALLAS)
    {
        SetPlayerColor(playerid, COLOR_PINK);
    }
    if (gTeam[playerid] == TEAM_MEXICAN)
    {
        SetPlayerColor(playerid, COLOR_YELLOW);
    }
    else if (gTeam[playerid] == TEAM_POLICE)
    {
        SetPlayerColor(playerid, COLOR_BLUE);
    }
}
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);

   

    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
    {
    if(gTeam[playerid] == TEAM_GROVE)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2511.4180,-1688.6161,13.5544);
    return 1;
    }
    else if(gTeam[playerid] == TEAM_BALLAS)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2232.8372,-1155.8481,25.8906);
    return 1;
    }
    if (gTeam[playerid] == TEAM_MEXICAN)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2251.7834,-1030.1400,56.4139);
    return 1;
    }
    else if(gTeam[playerid] == TEAM_POLICE)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1567.7501,-1692.6176,5.8906);
   

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#2

Put this
pawn Код:
SetPlayerTeamFromClass(playerid, classid);
Under
pawn Код:
public OnPlayerRequestClass(playerid,classid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)