SA-MP Forums Archive
[Help] Characters visable on class selection? - 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: [Help] Characters visable on class selection? (/showthread.php?tid=351499)



[Help] Characters visable on class selection? - .Wicked - 16.06.2012

Alright I'm completely new to scripting and I would need some help.

I would like to make the X characters to be visable on the class selection.
I currently have two classes, cops and criminals.

You can switch between the two teams but you can't see the skins.

So example, how should I make this "script" fit into my "system".

PHP код:
    SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746); 
My script:

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    switch(
classid)
    {
        case 
0/* The first classid is of the cops*/:
        {
            
gTeam[playerid] = TEAM_COPS;
            
GameTextForPlayer(playerid"~b~Cops"10003);
         }
        case 
1/* The second classid is of the criminals*/:
        {
            
gTeam[playerid] = TEAM_CRIMINALS;
            
GameTextForPlayer(playerid"~r~Criminals"10003);
          }
    }
    return 
1;




Re: [Help] Characters visable on class selection? - iggy1 - 16.06.2012

On your SetPlayerCameraPos funtion, use a position in front of the player. Yours is currently at the same position as the player; hence you cannot see the skins.

pawn Код:
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);//this is the same position you set the player above
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);//this one is ok
Use [pawn] tags not [php].


Re: [Help] Characters visable on class selection? - .Wicked - 16.06.2012

Thanks iggy1, I'll make sure to try it out

EDIT: Verry appreciated. It worked!