SetSpawnInfo problem.
#1

Good day. I have a problem when making player spawn when he loggs in. The problem is that sometimes SetSpawnInfo sets player skin as CJ, and sometimes as player's real skin. So that makes player spawn with CJ spawn sometimes. Maybe someone knows how to fix that one?

pawn Код:
forward OnPlayerDataLoad(playerid);
public   OnPlayerDataLoad(playerid)
{
           <...>
           new userSkin;
    cache_get_row(0, 9, Result); SetPlayerSkin(playerid, strval(Result));
    userSkin = strval(Result);

           <....>

    SetSpawnInfo(playerid, 0, userSkin, userPos[0], userPos[1], userPos[2], 0, 0, 0, 0, 0, 0, 0);
    SpawnPlayer (playerid);
    return (true);
}
Reply
#2

Quick fix would be SetPlayerSkin in OnPlayerSpawn callback. But if there is a better fix, I'd be glad to hear it as well
Reply
#3

Just call "SetPlayerSkin" after you spawn the player.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)