Try this.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
return 0; //Do "return 0;" here
}
Then, just show the dialog to the player when they connect.
pawn Код:
OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,CLASS,DIALOG_STYLE_LIST,"Classes","Trucker\nPilot\nTaxi Driver\nPolice\nRapist","Select","Exit");
return 1;
}