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



No class selection. - Welsh - 04.11.2010

Hi, I want to know if I can turn class selection off once a player joins the server so he will just spawn in a skin set at a location set without having to choose it. Thanks.


Re: No class selection. - Jeffry - 04.11.2010

Try:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SpawnPlayer(playerid);
    return 1;
}



Re: No class selection. - Welsh - 04.11.2010

Didn't work... :S


Re: No class selection. - OldDirtyBastard - 04.11.2010

try it under OnPlayerConnect


Re: No class selection. - Welsh - 04.11.2010

Didn't work... :3


Re: No class selection. - Jeffry - 04.11.2010

Then try:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetTimerEx("AntiClass", 10, 0, "d", playerid);
    return 1;
}
At Bottom of your code:
pawn Код:
forward AntiClass(playerid);
public AntiClass(playerid)
{
    SpawnPlayer(playerid);
    return 1;
}



Re: No class selection. - [WSF]ThA_Devil - 04.11.2010

Try:
on top:
pawn Код:
#define myskinid 0 // or other skin id
on ur callback:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerSkin(playerid, myskinid);
    SpawnPlayer(playerid);
    return 1;
}