SA-MP Forums Archive
Loading issues - 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: Loading issues (/showthread.php?tid=451737)



Loading issues - PakPak - 18.07.2013

Hello,

I've some issues with my loading system, when the player spawn, he didn't spawn in the correct position, in the correct.

pawn Код:
enum pInfo {
pId,
pNom,
pPassword,
pNiveau,
pExp,
pBan,
pBraison,
pAge,
pSexe,
pSpawnX,
pSpawnY,
pSpawnZ,
pSpawnVw,
pSpawnInt,
pArgent,
pBanque,
pAdmin,
pMail,
pSkin,
pTutoriel,
pLogged,
}
new PlayerInfo[MAX_PLAYERS][pInfo];


pawn Код:
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
    mysql_store_result();
    new type = resultid;
    new playerid = extraid;
    if(type == QUERY_LOGIN)
    {
        if(mysql_num_rows() != 0)
        {
            if(mysql_fetch_row_format(query, "|"))
            {
                sscanf(query,"e<p<|>s[24]s[32]iii>", PlayerInfo[playerid]);
                Spawn(playerid);
            }
        }
        else
        {
            new str[256];
            format(str, sizeof(str),"Mot de passe invalide.");
            TextDrawSetString(errormsg1[playerid],str);

        }
    }


pawn Код:
public Spawn(playerid)
{
    new str[80];
    format(str, sizeof(str),"Bienvenue %s.",PlayerInfo[playerid][pNom]);
    SendClientMessage(playerid, COLOR_BLUE, str);
    TogglePlayerControllable(playerid,1);
    CancelSelectTextDraw(playerid);
    PlayerInfo[playerid][pLogged] = 1;
    TextDrawHideForPlayer(playerid,box0);
    TextDrawHideForPlayer(playerid,box1);
    TextDrawHideForPlayer(playerid,titre1[playerid]);
    TextDrawHideForPlayer(playerid,msg1[playerid]);
    TextDrawHideForPlayer(playerid,msg2[playerid]);
    TextDrawHideForPlayer(playerid,errormsg1[playerid]);
    TextDrawHideForPlayer(playerid,suivant);
    SetPlayerPos(playerid,PlayerInfo[playerid][pSpawnX],PlayerInfo[playerid][pSpawnY],PlayerInfo[playerid][pSpawnZ]);
    SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pSpawnVw]);
    SetPlayerInterior(playerid,PlayerInfo[playerid][pSpawnInt]);
    SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);

}
Thanks for your help.


Re: Loading issues - PakPak - 18.07.2013

Help please.


Re : Loading issues - PakPak - 18.07.2013

Help