SA-MP Forums Archive
OnPlayerRequest class, Class Select doesn't appears - 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: OnPlayerRequest class, Class Select doesn't appears (/showthread.php?tid=413585)



OnPlayerRequest class, Class Select doesn't appears [SOLVED] - MiGu3X - 05.02.2013

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


Re: OnPlayerRequest class, Class Select doesn't appears - Scenario - 05.02.2013

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);



Respuesta: OnPlayerRequest class, Class Select doesn't appears - MiGu3X - 05.02.2013

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)


Re: OnPlayerRequest class, Class Select doesn't appears - Scenario - 05.02.2013

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);



Respuesta: OnPlayerRequest class, Class Select doesn't appears - MiGu3X - 05.02.2013

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


Respuesta: OnPlayerRequest class, Class Select doesn't appears - MiGu3X - 06.02.2013

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