SA-MP Forums Archive
deinit playerclass or make not selectable? - 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: deinit playerclass or make not selectable? (/showthread.php?tid=65101)



deinit playerclass or make not selectable? - fredl - 09.02.2009

is it possible to make a playerclass (forexample 0) unselectable by the player or delete it while game mode is running? or is there any script if you select class 0 it auto selects class 1?

its not really neccesary(?dont know how to write XD) but it would be fine if it works so i can make more configs into one gamemode


Re: deinit playerclass or make not selectable? - ICECOLDKILLAK8 - 09.02.2009

OnPlayerSpawn

then do if thier class is 0 then set thier skin to w/e


Re: deinit playerclass or make not selectable? - Eraz0r - 09.02.2009

Or you don't add the skin with AddPlayerClass


Re: deinit playerclass or make not selectable? - fredl - 09.02.2009

how can i get the playerclass?

but if i dont add one skin with add playerclass there are 484499393 or sowhat skins!!
sorry im a noob^^


Re: deinit playerclass or make not selectable? - Eraz0r - 09.02.2009

Simply use:

Код:
public OnPlayerRequestClass(playerid, classid)
{
 if(classid == THESKINUDONTWANT)
 {
  SetPlayerSkin(playerid,THESKINHESHOULDHAVE);
 }
 return 1;
}
or use:

Код:
public OnPlayerSpawn(playerid)
{
 new deniedskin = GetPlayerSkin(playerid); 
 if(deniedskin == 123) //the number must be the skin u dont want
 {
  SetPlayerSkin(playerid,222); //The skin he should have
 }
 return 1;
}