//I put this on OnPlayerConnect PlayerTextDrawSetPreviewModel(playerid,LoginRegs5[playerid], GetPlayerSkin(playerid)); PlayerTextDrawShow(playerid,LoginRegs5[playerid]); new imea[50]; format(imea,sizeof(imea),"%s",GetName(playerid)); PlayerTextDrawSetString(playerid,LoginRegs13[playerid], imea); PlayerTextDrawShow(playerid,LoginRegs13[playerid]); new levela[50]; format(levela,sizeof(levela),"%d",PlayerInfo[playerid][pLevel]); PlayerTextDrawSetString(playerid,LoginRegs14[playerid], levela); PlayerTextDrawShow(playerid,LoginRegs14[playerid]); new posoooo[50]; format(posoooo,sizeof(posoooo),"%s",PlayerInfo[playerid][pJob]); PlayerTextDrawSetString(playerid,LoginRegs16[playerid], posoooo); PlayerTextDrawShow(playerid,LoginRegs16[playerid]); new orgaz[50]; format(orgaz,sizeof(orgaz),"%s",PlayerInfo[playerid][pMember]); PlayerTextDrawSetString(playerid,LoginRegs17[playerid],orgaz); PlayerTextDrawShow(playerid,LoginRegs17[playerid]); new dona[50]; format(dona,sizeof(dona),"%d",PlayerInfo[playerid][pVip]); PlayerTextDrawSetString(playerid,LoginRegs15[playerid],dona); PlayerTextDrawShow(playerid,LoginRegs15[playerid]);
|
Obviously you can't show stuff that hasn't been loaded. The data has to be loaded from somewhere before it can be displayed. Also you can't reliably get a skin from a player that isn't spawned.
|
|
Its not showing i think because of loading your variables. Its loading PlayerInfo variables on login.
|
public UlogujIgraca(playerid,password[])
{
new tmp2[256];
new string2[128];
new playername2[MAX_PLAYER_NAME];
new playernamesplit[3][MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
split(playername2, playernamesplit, '_');
format(string2, sizeof(string2), "users/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
{
new key[ 256 ] , val[ 256 ];
new Data[ 256 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); }
if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = strval( val ); }
if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
if( strcmp( key , "MuteAD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuteAD] = strval( val ); }
if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }