Delete 3d text on spawn!!
#1

hi,

if a player is admin, a 3d text label is attached to this player at spawn.
BUt if this admin now disconnects and another player connects and gets the admin's samp id, the admin 3d text label will be attached to this no admin player as well.
So how to prevent that?
I've also tried to delete or update the label to " " (nothing) if the player is no admin but nothing works!
I've also tried to delete this label under OnPlayerDisconnect. Also does not work.

pawn Код:
new Text3D:AdminLabel[MAX_PLAYERS];

//OnPlayerDosconnect

Delete3DTextLabel(AdminLabel[playerid]);


//OnPlayerSpawn

    if(Spieler[playerid][AdminLevel] < 0)// if player is no admin
    {
    Delete3DTextLabel(AdminLabel[playerid]);
    }
    else if(Spieler[playerid][AdminLevel] > 0)// if player is admin
    {
    Add3DTextLabelToAdmin(playerid);
    }
 


stock Add3DTextLabelToAdmin(playerid)
{

    AdminLabel[playerid] = Create3DTextLabel("{FF007F}A{FF0000}d{FF007F}m{FF0000}i{FF007F}n",0xF97804FF,30.0,40.0,50.0,30,-1,1);

    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);

}
regards...
Reply


Messages In This Thread
Delete 3d text on spawn!! - by BlackWolf120 - 13.03.2011, 20:26
Re: Delete 3d text on spawn!! - by BlackWolf120 - 14.03.2011, 16:04
Re: Delete 3d text on spawn!! - by Sasino97 - 14.03.2011, 16:07
Re: Delete 3d text on spawn!! - by Ricop522 - 14.03.2011, 16:27
Re: Delete 3d text on spawn!! - by BlackWolf120 - 15.03.2011, 13:10
Re: Delete 3d text on spawn!! - by Voldemort - 15.03.2011, 13:14
Re: Delete 3d text on spawn!! - by Gertin - 15.03.2011, 13:20
Re: Delete 3d text on spawn!! - by HyperZ - 15.03.2011, 13:28
Re: Delete 3d text on spawn!! - by BlackWolf120 - 17.03.2011, 22:08
Re: Delete 3d text on spawn!! - by BlackWolf120 - 21.03.2011, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)