Make player skip skin selection if hes already registered? - 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: Make player skip skin selection if hes already registered? (
/showthread.php?tid=448486)
Make player skip skin selection if hes already registered? -
Nines - 04.07.2013
how to do that? and make him spawn where he was before.
Re: Make player skip skin selection if hes already registered? -
Kyle - 04.07.2013
Just use SetPlayerSkin and set the skin which the skin variable holds.
Re: Make player skip skin selection if hes already registered? -
GiamPy. - 04.07.2013
Re: Make player skip skin selection if hes already registered? -
ReVo_ - 04.07.2013
First set spawn info of the player:
https://sampwiki.blast.hk/wiki/SetSpawnInfo
then spawn him:
https://sampwiki.blast.hk/wiki/SpawnPlayer
I never tried but OnPlayerConnect (
https://sampwiki.blast.hk/wiki/OnPlayerConnect) should be ok (or the callback you use when he login).
Re: Make player skip skin selection if hes already registered? -
DobbysGamertag - 04.07.2013
Use a variable.
Check the variable on class selection, if they are registered. Spawn them, set their skin.
pawn Код:
new IsRegistered[MAX_PLAYERS];
public OnPlayerRequestClass(playerid)
{
if(IsRegistered[playerid] == 1)
{
SpawnPlayer(playerid);
}
else
{
SetupPlayerForClassSelection(playerid)
}
return 1;
}
Wrote it here in the reply box, sorry for indentation. But that's how i'd do it. Do as KyleSmith said too. You gotta save their skin. Follow the code i provided (if you want), spawn the player, set their skin
Easier than you think.
Re: Make player skip skin selection if hes already registered? -
Nines - 04.07.2013
@DobbysGamertag
How would I go about adding it to this code though?
Код:
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0) GameTextForPlayer(playerid,"~r~Skin Selection",2000,6);
{
SetPlayerPos(playerid,1766.1969,-1945.0790,13.5643);
SetPlayerCameraPos(playerid,1768.5718,-1942.9174,13.5615);
SetPlayerFacingAngle(playerid,312.7264);
SetPlayerCameraLookAt(playerid,1766.1969,-1945.0790,13.5643);
}
return 1;
}