Need help with error:undefined symbol "SetupPlayerForClassSelection"
#1

I'm still very new to scripting,
I'm making this basic TDM-script from scratch to learn the basics.
also using '' AddplayerClassEx " , " new gTeam[MAX_PLAYERS]; " , " new gPlayerClass[MAX_PLAYERS]; "
I tried looking for tutorials,
but I couldn't find the one with " AddplayerClassEx and new gTeam[MAX_PLAYERS]; used together.

I defined teams and their colors.
pawn Код:
#include <a_samp>

//  TEAMS   //
#define GROVE   0   //  GROVE STREET
#define AZTEC   1   //  AZTECAS
#define TRIAD   2   //  TRIADS
#define BALLA   3   //  BALLAS
#define VAGOS   4   //  VAGOS
#define RIFFA   5   //  RIFFAS
#define ITALI   6   //  ITALIAN MAFIA
#define RUSSI   7   //  RUSSIAN MAFIA

//  TEAM_COLORS //
#define GROVE_COLOR 0x00FF00    //  GREEN
#define AZTEC_COLOR 0x00FFFF    //  CYAN/AQUA
#define TRIAD_COLOR 0x000000    //  BLACK
#define BALLA_COLOR 0x800080    //  PURPLE
#define VAGOS_COLOR 0xFFFF00    //  YELLOW
#define RIFFA_COLOR 0x00CDCD    //  CYAN3
#define ITALI_COLOR 0xDA70D6    //  ORCHID
#define RUSSI_COLOR 0xDC143C    //  CRIMSON

new gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];

main()
{
    print("\n----------------------------------");
    print(" SIMPLE_GANG_DEATH_MATCH_TEST");
    print("----------------------------------\n");
}
then added AddPlayerClassEx , spawn points and skins.

pawn Код:
public OnGameModeInit()
{
    SetGameModeText("GANG_DEATH_MATCH_TEST");

//  TEAM_GROVE_STREET   //
    AddPlayerClassEx(0,0,-1956.1792,-858.7108,35.8909,94.7386,0,0,0,0,0,0);     // Carl Johnson     //  classid 0
    AddPlayerClassEx(0,4,-1956.1796,-852.4495,35.8909,91.3153,0,0,0,0,0,0);     // Big Bear Skinny  //  classid 1
    AddPlayerClassEx(0,5,-1956.1742,-865.3016,35.8909,92.5687,0,0,0,0,0,0);     // Big Bear Big     //  classid 2
    AddPlayerClassEx(0,6,-1953.3268,-865.3279,35.8909,271.7737,0,0,0,0,0,0);    // Emmet            //  classid 3
    AddPlayerClassEx(0,65,-1956.1809,-861.8378,35.8909,95.7020,0,0,0,0,0,0);    // Kendl            //  classid 4
    AddPlayerClassEx(0,86,-1953.3270,-862.1342,35.8909,271.7970,0,0,0,0,0,0);   // Ryder            //  classid 5
    AddPlayerClassEx(0,105,-1953.3267,-858.8466,35.8909,271.4836,0,0,0,0,0,0)// Hommie           //  classid 6
    AddPlayerClassEx(0,106,-1953.3269,-855.7074,35.8909,270.5435,0,0,0,0,0,0)// Hommie           //  classid 7
    AddPlayerClassEx(0,107,-1953.3267,-852.0621,35.8909,270.5435,0,0,0,0,0,0)// Hommie           //  classid 8
    AddPlayerClassEx(0,149,-1954.6643,-850.5545,35.8906,5.0261,0,0,0,0,0,0);    // Big Smoke Vest   //  classid 9
    AddPlayerClassEx(0,195,-1956.1812,-856.7148,35.8909,88.2052,0,0,0,0,0,0);   // Denise           //  classid 10
    AddPlayerClassEx(0,269,-1954.7283,-866.8278,35.8906,180.3261,0,0,0,0,0,0)// Big Smoke        //  classid 11
    AddPlayerClassEx(0,270,-1956.1810,-856.7260,35.8909,93.8687,0,0,0,0,0,0);   // Sweet            //  classid 12
    AddPlayerClassEx(0,271,-1956.1812,-860.5609,35.8909,91.0486,0,0,0,0,0,0);   // Ryder            //  classid 13
    AddPlayerClassEx(0,293,-1946.8241,-867.4861,35.8906,327.6175,0,0,0,0,0,0)// OG LOC           //  classid 14

//  TEAM_AZTECAS    //
    AddPlayerClassEx(1,292,-1645.1799,1401.0564,9.8047,135.4714,0,0,0,0,0,0);   // Cesar            //  classid 15
    AddPlayerClassEx(1,116,-1639.5908,1395.1489,9.8047,135.4714,0,0,0,0,0,0);   // Hazer            //  classid 16
    AddPlayerClassEx(1,115,-1651.9246,1407.7083,9.8047,134.5547,0,0,0,0,0,0);   // Gal              //  classid 17
    AddPlayerClassEx(1,114,-1648.0935,1403.6207,9.8047,139.8814,0,0,0,0,0,0);   // Sunny            //  classid 18
    AddPlayerClassEx(1,48,-1658.2126,1412.2886,15.5313,184.0621,0,0,0,0,0,0);   // Hispanic Male    //  classid 19
    AddPlayerClassEx(1,41,-1639.4552,1390.0295,18.4075,54.1476,0,0,0,0,0,0);    // Hispanic Female  //  classid 20

//  TEAM_TRIAD  //
    AddPlayerClassEx(2,294,-2227.5300,630.1570,65.3735,1.3314,0,0,0,0,0,0);     // Wu Zi Mu         //  classid 21
    AddPlayerClassEx(2,208,-2226.3711,625.7622,65.3735,267.2089,0,0,0,0,0,0);   // Su Zi            //  classid 22
    AddPlayerClassEx(2,117,-2212.9705,634.1310,58.0398,354.7980,0,0,0,0,0,0);   // Gangster         //  classid 23
    AddPlayerClassEx(2,118,-2213.3584,625.9802,58.0398,179.3530,0,0,0,0,0,0);   // Gangster         //  classid 24
    AddPlayerClassEx(2,120,-2180.0596,646.3052,54.5263,176.0747,0,0,0,0,0,0);   // Gangster         //  classid 25
    AddPlayerClassEx(2,141,-2232.2092,636.7421,60.1797,86.3390,0,0,0,0,0,0);    // Gangster Girl    //  classid 26
    AddPlayerClassEx(2,263,-2232.2092,636.7421,60.1797,86.3390,0,0,0,0,0,0);    // Gangster Girl    //  classid 27

//  TEAM_BALLA  //
    AddPlayerClassEx(3,13,-2619.5793,115.1928,10.3484,272.8341,0,0,0,0,0,0);    // Balla Girl       //  classid 28
    AddPlayerClassEx(3,102,-2621.9702,118.8493,10.9033,271.9174,0,0,0,0,0,0);   // Balla            //  classid 29
    AddPlayerClassEx(3,103,-2622.0461,123.5954,10.9033,269.4107,0,0,0,0,0,0);   // Balla            //  classid 30
    AddPlayerClassEx(3,104,-2633.9456,129.2132,13.4142,93.9658,0,0,0,0,0,0);    // Balla            //  classid 31

//  TEAM_VAGOS  //
    AddPlayerClassEx(4,108,-2673.8484,779.7158,54.2690,0.6923,0,0,0,0,0,0);     // Vago             //  classid 32
    AddPlayerClassEx(4,109,-2644.5933,780.1951,54.2690,358.4991,0,0,0,0,0,0);   // Vago             //  classid 33
    AddPlayerClassEx(4,110,-2661.5671,780.3441,54.2690,0.3791,0,0,0,0,0,0);     // Vago             //  classid 34
    AddPlayerClassEx(4,215,-2689.0354,779.7709,54.2681,1.3423,0,0,0,0,0,0);     // Vago Woman       //  classid 35

//  TEAM_RIFFAS //
    AddPlayerClassEx(5,273,-2151.3828,-189.5956,41.1297,268.1769,0,0,0,0,0,0)// T-Bone           //  classid 36
    AddPlayerClassEx(5,184,-2151.4192,-196.7208,41.1297,265.9836,0,0,0,0,0,0)// T-Bone Junior    //  classid 37
    AddPlayerClassEx(5,173,-2141.0513,-88.5455,44.9688,2.4911,0,0,0,0,0,0);     // Gangster         //  classid 38
    AddPlayerClassEx(5,174,-2099.5220,-95.9408,41.1297,59.7615,0,0,0,0,0,0);    // Gangster         //  classid 39
    AddPlayerClassEx(5,175,-2140.2354,-111.1659,42.0465,346.7778,0,0,0,0,0,0)// Gangster         //  classid 40
    AddPlayerClassEx(5,55,-2159.0923,-186.3375,41.1297,89.6970,0,0,0,0,0,0);    // Gangster Girl    //  classid 41

//  TEAM_ITALIAN_MAFIA  //
    AddPlayerClassEx(6,119,356.2978,176.0620,1008.3762,270.5753,0,0,0,0,0,0);   // Johny            //  classid 42
    AddPlayerClassEx(6,124,359.1599,174.9290,1008.3893,271.2020,0,0,0,0,0,0);   // Goon             //  classid 43
    AddPlayerClassEx(6,125,359.2124,172.3364,1008.3828,269.0086,0,0,0,0,0,0);   // Goon             //  classid 44
    AddPlayerClassEx(6,126,356.2949,166.8125,1008.3762,272.4787,0,0,0,0,0,0);   // Goon             //  classid 45
    AddPlayerClassEx(6,127,356.2946,178.3335,1008.3762,271.2253,0,0,0,0,0,0);   // Goon             //  classid 46
    AddPlayerClassEx(6,258,356.2979,181.2723,1008.3762,271.5154,0,0,0,0,0,0);   // Goon             //  classid 47
    AddPlayerClassEx(6,259,356.2942,164.2055,1008.3762,269.9487,0,0,0,0,0,0);   // Goon             //  classid 48
    AddPlayerClassEx(6,272,359.7139,173.6577,1008.3893,269.9487,0,0,0,0,0,0);   // Boss             //  classid 49
    AddPlayerClassEx(6,91,357.1790,173.5150,1008.3822,270.1170,0,0,0,0,0,0);    // Wife             //  classid 50


//  TEAM_RUSSIAN_MAFIA  //
    AddPlayerClassEx(7,3,-1540.9369,112.7794,17.3226,134.2635,0,0,0,0,0,0);     // Andre            //  classid 51
    AddPlayerClassEx(7,60,-1568.5757,82.0382,17.3281,48.4094,0,0,0,0,0,0);      // T-Shirt Guy      //  classid 52
    AddPlayerClassEx(7,111,-1562.8346,87.7785,17.3281,52.5062,0,0,0,0,0,0);     // Big Tough Goon   //  classid 53
    AddPlayerClassEx(7,112,-1557.7954,92.8186,17.3281,43.1061,0,0,0,0,0,0);     // Tough Guy        //  classid 54
    AddPlayerClassEx(7,113,-1543.9208,95.9091,17.3281,44.5044,0,0,0,0,0,0);     // Boss Man         //  classid 55
    AddPlayerClassEx(7,216,-1539.9845,95.4003,17.3281,137.2520,0,0,0,0,0,0);    // Boss's Wife      //  classid 56

    return 1;
}
Then I tried to make teams / gangs

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);
    SetPlayerTeamFromClass(playerid, classid);
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9 || classid == 10 || classid == 11 || classid == 12 || classid == 13 || classid == 14)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~GROVE_STREET_FAMILIES", 500, 3);
        gTeam[playerid] = 0;
        return 1;
    }
    if(classid == 15 || classid == 16|| classid == 17 || classid == 18 || classid == 19 || classid == 20)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~AZTECAS", 500, 3);
        gTeam[playerid] = 1;
        return 1;
    }
    if(classid == 21 || classid == 22 || classid == 23 || classid == 24 || classid == 25 || classid == 26 || classid == 27)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~THE_TRIADS", 500, 3);
        gTeam[playerid] = 2;
        return 1;
    }
    if(classid == 28 || classid == 29 || classid == 30 || classid == 31)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~BALLAS", 500, 3);
        gTeam[playerid] = 3;
        return 1;
    }
    if(classid == 32 || classid == 33 || classid == 34 || classid == 35)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~VAGOS", 500, 3);
        gTeam[playerid] = 4;
        return 1;
    }
    if(classid == 36 || classid == 37 || classid == 38 || classid == 39 || classid == 40 || classid == 41)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~RIFFAS", 500, 3);
        gTeam[playerid] = 5;
        return 1;
    }
    if(classid == 42 || classid == 43 || classid == 44 || classid == 45 || classid == 46 || classid == 47 || classid == 48 || classid == 49 || classid == 50)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~ITALIAN_MAFIA", 500, 3);
        gTeam[playerid] = 6;
        return 1;
    }
    if(classid == 51 || classid == 52 || classid == 53 || classid == 54 || classid == 55 || classid == 56)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~RUSSIAN_MAFIA", 500, 3);
        gTeam[playerid] = 4;
        return 1;
    }
    return 1;
}
Tried Compiling and gets 9 errors
pawn Код:
C:\Users\User\Desktop\TEST.pwn(122) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(131) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(138) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(145) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(152) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(159) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(166) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(173) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(180) : error 017: undefined symbol "SetupPlayerForClassSelection"
C:\Users\User\Desktop\TEST.pwn(367) : warning 203: symbol is never used: "gPlayerClass"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.
Also is there a way to make this line shorter ?

pawn Код:
if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9 || classid == 10 || classid == 11 || classid == 12 || classid == 13 || classid == 14)
    {
        SetupPlayerForClassSelection(playerid);
        GameTextForPlayer(playerid, "~w~GROVE_STREET_FAMILIES", 500, 3);
        gTeam[playerid] = 0;
        return 1;
Reply
#2

Use switch(classid) and for cases do it like
PHP код:
case 0..14// 0,1,2....14
{
    
//code

Don't you have a function SetupPlayerForClassSelection?
You must create it, but i see its useless since you already set the variable
Reply
#3

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Use switch(classid) and for cases do it like
PHP код:
case 0..14// 0,1,2....14
{
    
//code

Don't you have a function SetupPlayerForClassSelection?
You must create it, but i see its useless since you already set the variable
How to add "SetupPlayerForClassSelection" function ?

And I removed
pawn Код:
SetupPlayerForClassSelection(playerid);
SetPlayerTeamFromClass(playerid, classid);
from
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}
and added cases like this , I hope this is what you meant.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

switch(classid)
    {
                case 0 .. 14:
        {
            gTeam[playerid] = GROVE;
        }
                case 15 .. 20:
                {
            gTeam[playerid] = AZTEC;
                }
        case 21 .. 27:
        {
            gTeam[playerid] = TRIAD;
        }
                case 28 .. 31:
                {
                        gTeam[playerid] = BALLA;
                }
                case 32 .. 35:
                {
                        gTeam[playerid] = VAGOS;
                }
                case 36 .. 41:
                {
                        gTeam[playerid] = RIFFA;
                }
                case 42 .. 50:
                {
                        gTeam[playerid] = ITALI;
                }
                case 51 .. 56:
                {
                        gTeam[playerid] = TRIAD;
                }
    }
but 9 errors on compiling
pawn Код:
C:\Users\User\Desktop\TEST.pwn(124) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(126) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(130) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(134) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(138) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(142) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(146) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(150) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(154) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(339) : warning 203: symbol is never used: "gTeam"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.
Thanks for the fast reply though.
Reply
#4

SetupPlayerForClassSelection is camera and position. Check lvdm or rivershell script.
Reply
#5

Quote:

public OnPlayerRequestClass(playerid, classid)
{
return 1;
}

switch(classid)
{
case 0 .. 14:
{
gTeam[playerid] = GROVE;
}
case 15 .. 20:
{
gTeam[playerid] = AZTEC;
}
case 21 .. 27:
{
gTeam[playerid] = TRIAD;
}
case 28 .. 31:
{
gTeam[playerid] = BALLA;
}
case 32 .. 35:
{
gTeam[playerid] = VAGOS;
}
case 36 .. 41:
{
gTeam[playerid] = RIFFA;
}
case 42 .. 50:
{
gTeam[playerid] = ITALI;
}
case 51 .. 56:
{
gTeam[playerid] = TRIAD;
}
}

switch must be insibe OnPlayerRequestClass, like that
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    switch(
classid)
    {
                case 
.. 14:
        {
            
gTeam[playerid] = GROVE;
        }
                case 
15 .. 20:
                {
            
gTeam[playerid] = AZTEC;
                }
        case 
21 .. 27:
        {
            
gTeam[playerid] = TRIAD;
        }
                case 
28 .. 31:
                {
                        
gTeam[playerid] = BALLA;
                }
                case 
32 .. 35:
                {
                        
gTeam[playerid] = VAGOS;
                }
                case 
36 .. 41:
                {
                        
gTeam[playerid] = RIFFA;
                }
                case 
42 .. 50:
                {
                        
gTeam[playerid] = ITALI;
                }
                case 
51 .. 56:
                {
                        
gTeam[playerid] = TRIAD;
                }
    }
    return 
1;

Here is SetupPlayerForClassSelection, from riveshell script as Vince said
PHP код:
forward SetupPlayerForClassSelection(playerid);
public 
SetupPlayerForClassSelection(playerid)
{
    
// Set the player's orientation when they're selecting a class.
    
SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
    
SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
    
SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
    
SetPlayerFacingAngle(playerid,0.0);

and Readd this line
PHP код:
SetupPlayerForClassSelection(playerid); 
OnPlayerRequestClass
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
SetupPlayerForClassSelection is camera and position. Check lvdm or rivershell script.
Oh this ?
pawn Код:
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
Reply
#7

Quote:
Originally Posted by Domenic_Corleone
Посмотреть сообщение
Oh this ?
pawn Код:
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
Have you even read my post?
Reply
#8

Yes , It compiled without error Thank you so much Shinja.
But where should I re-add. these two functions ?
pawn Код:
SetupPlayerForClassSelection(playerid);




forward SetupPlayerForClassSelection(playerid);
public SetupPlayerForClassSelection(playerid)
{
    // Set the player's orientation when they're selecting a class.
    SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
    SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
    SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
    SetPlayerFacingAngle(playerid,0.0);
}
In the script which I just edited
pawn Код:
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);
        SetPlayerFacingAngle(playerid,0.0);
    switch(classid)
    {
        case 0 .. 14:
        {
            gTeam[playerid] = 0;
        }
        case 15 .. 20:
        {
            gTeam[playerid] = 1;
        }
        case 21 .. 27:
        {
            gTeam[playerid] = 2;
        }
        case 28 .. 31:
        {
            gTeam[playerid] = 3;
        }
        case 32 .. 35:
        {
            gTeam[playerid] = 4;
        }
        case 36 .. 41:
        {
            gTeam[playerid] = 5;
        }
        case 42 .. 50:
        {
            gTeam[playerid] = 6;
        }
        case 51 .. 56:
        {
            gTeam[playerid] = 7;
        }
    }
    return 1;
}
Reply
#9

Quote:
Originally Posted by Domenic_Corleone
Посмотреть сообщение
Yes , It compiled without error Thank you so much Shinja.
But where should I re-add. these two functions ?
pawn Код:
SetupPlayerForClassSelection(playerid);
forward SetupPlayerForClassSelection(playerid);
In the script which I just edited
pawn Код:
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);
        SetPlayerFacingAngle(playerid,0.0);
    switch(classid)
    {
        case 0 .. 14:
        {
            gTeam[playerid] = 0;
        }
        case 15 .. 20:
        {
            gTeam[playerid] = 1;
        }
        case 21 .. 27:
        {
            gTeam[playerid] = 2;
        }
        case 28 .. 31:
        {
            gTeam[playerid] = 3;
        }
        case 32 .. 35:
        {
            gTeam[playerid] = 4;
        }
        case 36 .. 41:
        {
            gTeam[playerid] = 5;
        }
        case 42 .. 50:
        {
            gTeam[playerid] = 6;
        }
        case 51 .. 56:
        {
            gTeam[playerid] = 7;
        }
    }
    return 1;
}
Actually this code is same as the one with SetupPlayerForClassSelection
SetPlayerForClassSelection calls this part
PHP код:
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
        
SetPlayerFacingAngle(playerid,0.0); 
and you already put this in OnPlayerRequestClass, so you don't need this function anymore, remove it and compile
Reply
#10

Oh , Thank you very much , +Reped both for taking the time to help a newbie.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)