Make player skip skin selection if hes already registered?
#1

how to do that? and make him spawn where he was before.
Reply
#2

Just use SetPlayerSkin and set the skin which the skin variable holds.
Reply
#3

pawn Код:
SpawnPlayer();
Reply
#4

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).
Reply
#5

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.
Reply
#6

@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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)