SA-MP Forums Archive
Streamer incognito problem - 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: Streamer incognito problem (/showthread.php?tid=486963)



Streamer incognito problem - holahola - 11.01.2014

Hi guys i have a problem with dynamic3dtextlabel of incognito's plugin.

When the players log in my server the label not appear or about 10-20 minutes disappears.
Why?

I'll post below what interests 3dlabels of the script :

# define CreaPlayerLabel (% 1 % 2 % 3 % 4 % 5 % 6 % 7) CreateDynamic3DTextLabel (% 1 % 2 % 3 % 4 % 5 % 6 % 7 INVA LID_VEHICLE_ID , 1, -1, -1 , -1,20.0 )
#define RimuoviLabel(%1) DestroyDynamic3DTextLabel(%1)
#define UppaLabel(%1,%2,%3) UpdateDynamic3DTextLabelText(%1,%2,%3)

enum pTags
{
Text3D : ptagid ,
pcreato ,
} ;
new PlayerTags [ MAX_PLAYERS ] [ pTags ] ;

Ongamemodeinit :
for ( new i = 0; i < MAX_PLAYERS ; i + + )
PlayerTags [ i] [ pcreato ] = 0;


Created:
public OnPlayerSpawn ( playerid )
{
if ( PlayerTags [ playerid ] [ pcreato ] == 1)
RimuoviLabel(PlayerTags[playerid][ptagid]);


PlayerTags [ playerid ] [ ptagid ] = CreaPlayerLabel (string, 0xFFFFFFFF , 0.0,0.0,0.05,1 5.0, playerid ) ;
PlayerTags [ playerid ] [ pcreato ] = 1;

}
when lost hp :

new name [ 30 ] ;
format ( name , sizeof (name), "% s (% d)" , NomePlayerSenzaU nderscore ( playerid ) , playerid ) ;
if ( health > = 95.0 )
return 1;
if ( health < 95.0 && health > = 75.0 )
UppaLabel ( PlayerTags [ playerid ] [ ptagid ] , 0x32CD32FF , name ) ;/ / green
if ( health < 75.0 && health > = 35.0 )
UppaLabel ( PlayerTags [ playerid ] [ ptagid ] , 0xFFA500FF , name ) ;/ / yellow
if ( health < 35.0 )
UppaLabel ( PlayerTags [ playerid ] [ ptagid ] , 0C143CFF , name ) ;/ / reddish

When he dies :

new name [ 30 ] ;
format ( name , sizeof (name), "% s (% d)" , NomePlayerSenzaU nderscore ( playerid ) , playerid ) ;
UppaLabel ( PlayerTags [ playerid ] [ ptagid ] , 0xFFFFFFFF , name ) ;

When disconnect :
if ( PlayerTags [ playerid ] [ pcreato ] == 1)
{
RimuoviLabel ( PlayerTags [ playerid ] [ ptagid ] ) ;
PlayerTags [ playerid ] [ pcreato ] = 0 ;
}


CreateDynamic3DTextLabel(const text[], color, Float, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
another question but playerid=-1 in createdynamic3dtextlabel what is?


Re: Streamer incognito problem - holahola - 11.01.2014

Edited.


Re: Streamer incognito problem - holahola - 27.04.2014

Re-up