Save class? - 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: Save class? (
/showthread.php?tid=299805)
Save class? -
Admigo - 27.11.2011
Heey all,
How can i let a class save for a player if he choose that class?
Explain:if player is joined again at class selection set automatic to your class and you can not choose other class.
Thanks Admigo
Re: Save class? -
Tanush123 - 27.11.2011
Well add a variable for example
pawn Код:
new skinclass[MAX_PLAYERS];
and make a command that saves the skin
pawn Код:
CMD:saveskin(playerid,params[])
{
new skinid;
if(sscanf(params,"d",skinid)) return SendClientMessage(playerid,-1,"USAGE: /saveskin [skinid]");
if(skinid < 0) return SendClientMessage(playerid,-1,"ERROR: UNKNOWN SKIN ID");
if(skinid > 299) return SendClientMessage(playerid,-1,"ERROR: UNKNOWN SKIN ID");
skinclass[playerid] = skinid;
SetPlayerSkin(playerid,skinid);
return 1;
}
Then under onplayerspawn add
pawn Код:
SetPlayerSkin(playerid,skinclass[playerid]);
Re: Save class? -
Admigo - 27.11.2011
I need to know how to disable to choose other class when you spawned with it.