SA-MP Forums Archive
Class selection problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Class selection problem (/showthread.php?tid=262400)



Class selection problem - eXtrike - 17.06.2011

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new
        string[ 256 ]
    ;
    SetPlayerPos(playerid, -2482.26, -285.37, 40.54);
    SetPlayerFacingAngle(playerid, 90.00);
    SetPlayerCameraPos(playerid, -2485.67, -287.22, 42.34);
    SetPlayerCameraLookAt(playerid, -2481.59, -285.01, 40.49);
    switch(classid)
    {
        case 0:
        {
            SetPlayerSkin(playerid, 180);
            format(string, sizeof(string), "~r~Bloodz");
            GameTextForPlayer(playerid,string,3500,6);
        }
        case 1:
        {
            SetPlayerSkin(playerid, 67);
            format(string, sizeof(string), "~r~Bloodz");
            GameTextForPlayer(playerid,string,3500,6);
        }
        case 2:
        {
            SetPlayerSkin(playerid, 297);
            format(string, sizeof(string), "~b~Cripz");
            GameTextForPlayer(playerid,string,3500,6);
        }
        case 3:
        {
            SetPlayerSkin(playerid, 21);
            format(string, sizeof(string), "~b~Cripz");
            GameTextForPlayer(playerid,string,3500,6);
        }
    }
    SetPlayerTeamFromClass(playerid,classid);
    return 1;
}
look

class id 0 : /imageshack/img600/3113/samp000ka.png
class id 1 : /imageshack/img89/2250/samp001pw.png
class id 2 : /imageshack/img827/8773/samp002rth.png
class id 4 : /imageshack/img691/8250/samp003mxq.png
and next press buton : /imageshack/img718/4620/samp004gp.png

If I click on 'next' button, I don't want be a possible 'classid 4', I wanna return to 'classid 0'


Re: Class selection problem - Sascha - 17.06.2011

then remove the 5th "AddPlayerClass" from your gamemode


Re: Class selection problem - eXtrike - 17.06.2011

Now either forward or backward to give does not work.


Re: Class selection problem - sleepysnowflake - 17.06.2011

Why don't you put skins at OnGameModeInit and try to check if the classid is tralala to send the GameMode Text ?


Re: Class selection problem - eXtrike - 18.06.2011

Closed.
I added AddPlayerClass.