Skin beeing set to 0?
#1

NEVER SOLVED
Reply
#2

bump i wonder if anyone could help since it still unsolved
Reply
#3

If your "OnAccountLoad" callback gets called under OnPlayerRequestClass, you should use SetSpawnInfo to set the player's spawn skin. Other than that, it'll be using default skins (either class skins or CJ skin if no classes are found).
Reply
#4

Could you give me an example please?
Also why team turns from 5 to -1
Reply
#5

pawn Код:
public OnAccountLoad(playerid)
{
    //Your stuffs
    g_PlayerLoggedIn[playerid] = true; //You may already have something similar to this.
    return 1;
}

public OnPlayerRequestSpawn(playerid) //The callback called before player getting spawned
{
    if(g_PlayerLoggedIn[playerid])
        SetSpawnInfo(playerid, g_SavedTeam[playerid], g_SavedSkin[playerid], ...); //Set the spawn info, make sure you store the class information to use them in this function.
    return 1;
}
So when the player spawns, they'll be using the saved skin.
Reply
#6

So I use it on playerrequestspawn or to the accountload function the setspawninfo?? I want the player to spawn automatically after the login dialog
Reply
#7

Well then use SetSpawnInfo before using SpawnPlayer function under your OnAccountLoad callback. Also, you don't have to use SetPlayerSkin function there.
Reply
#8

So I put setspawninfo and spawnplayer and I'm ok?
Reply
#9

Yes, that's what my post said..
Reply
#10

So i did some changes and used what you told me but now it saves team and skin is set to police skin :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)