OnPlayerRequest class, Class Select doesn't appears
#1

The code I got is this:

Код:
public OnGameModeInit( )
{
	SetGameModeText (GameMode); // Le pone nombre al GameMode.
    AddPlayerClassEx( 0, 230, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 10000, 25, 10000, 34, 10000 ); // HOMELESS.
    AddPlayerClassEx( 1, 137, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 10000, 25, 10000, 34, 10000 ); // HOMELESS 2.

    return 1;
}

public OnPlayerRequestClass( playerid, classid )
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerInterior(playerid, 0);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	
    switch ( classid )
    {
        case 0:
        {
            GameTextForPlayer( playerid, "~r~TEAM ALPHA", 1000, 3 );
            // ~r~ es el color rojo entonces "TEAM ALPHA" va a estar escrito en color rojo.
            SetPlayerTeam( playerid, TEAM_HOMELESS );
        }

        case 1:
        {
            GameTextForPlayer( playerid, "~b~TEAM BETA", 100, 3 );
            // ~b~ es el color azul entonces "TEAM BETA" va a estar escrito en color azul.
            SetPlayerTeam( playerid, TEAM_HOMELESS_2 );
        }

    }
    return 1;
}
The problem i got is this:



The Player skin doesn't appears, pls help :S
Help me fastly, as i need this urgently ,

REGARDS, migu3x
Reply
#2

I don't believe this is a valid function:

pawn Код:
AddPlayerClassEx
The correct function would be:

pawn Код:
AddPlayerClass
For example, doing the following code would add every single skin available and seems to work flawlessly:

pawn Код:
for(new i = 1; i < 299; i++) AddPlayerClass(i, 2092.2195, -1752.2701, 12.9562, 271.3277, 24, 9999999, 0, 0, 0, 0);
Reply
#3

i only want on team selection, skins 230 for ALPHA and 137 for BEta, need help with that, and wiki.sa-mp.com/wiki/AddPlayerClassEx (it's a valid function)
Reply
#4

Oh okay, my apologizes.

I would use the AddPlayerClass function (w/o the team ID's), and just use SetPlayerTeam when you spawn them.

Or, just for testing purposes, don't worry about the team right now and see if using AddPlayerClass fixes anything compared to AddPlayerClassEx.

Otherwise, it would probably end up being a configuration issue with this:

pawn Код:
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerInterior(playerid, 0);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
Reply
#5

I dont think that would be the issue, that worked other times i guess
Reply
#6

SOLVED, I used SetCameraBehindPlayer(playerid); and Player appeared SO HAPPY but thx for help bro rep+
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)