SA-MP Forums Archive
Problem with OnPlayerRequestClass - 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: Problem with OnPlayerRequestClass (/showthread.php?tid=457199)



Problem with OnPlayerRequestClass - NinjahZ - 09.08.2013

I have tried to fix the error,but I still get errors,I have posted my problem at GitHub.
Quote:
Secret Project Problem Link



Re: Problem with OnPlayerRequestClass - BullseyeHawk - 09.08.2013

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(gTeam[playerid] == 0) //line 460
    {
        SetPlayerTeamFromClass(playerid,0); //462
    }
    else if(gTeam[playerid] == 1)//line 464
    {
        SetPlayerTeamFromClass(playerid,1);
    }//line 467
    else//line 468
    {
        if(PickedClass[playerid] == 0)//line 470
        {
            ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_LIST, "Title", "listitem1\nlistitem2", "Select","Cancel");
        }
    }
}
How about now, most simple thing to fix honsetly..
EDIT: Wops sorry, posted the wrong code. Fixed now.
EDIT 2: Found some errors in the last coding, I think this is what you originaly ment.


Re: Problem with OnPlayerRequestClass - NinjahZ - 09.08.2013

Perfect man,thats exactly what I needed,I will +rep when I can mate your profile is saved into favs so I will remember