Delete 3d text on spawn!! -
BlackWolf120 - 13.03.2011
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...
Re: Delete 3d text on spawn!! -
BlackWolf120 - 14.03.2011
does someone know what i am doing wrong?
Pls help
Re: Delete 3d text on spawn!! -
Sasino97 - 14.03.2011
I also have this f***** problem....
Re: Delete 3d text on spawn!! -
Ricop522 - 14.03.2011
pawn Код:
//Public onplayerconnect
AdminLabel[playerid] = Create3DTextLabel(" ", 0x00000000, 0.0, 0.0, 0.0, 50.0, -1, 0);
Re: Delete 3d text on spawn!! -
BlackWolf120 - 15.03.2011
mhh this also does not work.
Any other ideas?
Please this is very important.
Re: Delete 3d text on spawn!! -
Voldemort - 15.03.2011
new PlayerText3D:AdminLabel[MAX_plAYERS];
Create
Player3DTextLabel()
Delete
Player3DTextLabel()
Update
Player3DTextLabelText()
Re: Delete 3d text on spawn!! -
Gertin - 15.03.2011
You can make that too :
pawn Код:
new Text3D:AdminLable[ MAX_PLAYERS ], AdminDuty[ MAX_PLAYERS ];
pawn Код:
COMMAND:adminlable(playerid, params[])
{
if(Spieler[playerid][AdminLevel] > 0) return SendClientMessage(playerid,RED,"You need to be level 1 to use this command!");
if( AdminDuty[ playerid ] == 0 )
{
AdminLable[ playerid ] = 1;
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);
return SendClientMessage(playerid, Yellow, "You are now AdminDuty!");
}
else
{
AdminDuty[ playerid ] = 0;
Delete3DTextLabel( AdminLable[ playerid ] );
return SendClientMessage(playerid, Yellow, "You are not now AdminDuty!");
}
}
I dont know, is that working, but try
If you dont know, how to use ZCMD, then send me PM, i teach
Re: Delete 3d text on spawn!! -
HyperZ - 15.03.2011
pawn Код:
new Text3D:AdminLabel[MAX_PLAYERS];
//OnPlayerDosconnect
Update3DTextLabelText(AdminLabel[playerid], 0xFFFFFFFF, " ");
//OnPlayerSpawn
if(Spieler[playerid][AdminLevel] < 0)
{
Update3DTextLabelText(AdminLabel[playerid], 0xFFFFFFFF, " ");
}
else if(Spieler[playerid][AdminLevel] < 1)
{
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);
}
Re: Delete 3d text on spawn!! -
BlackWolf120 - 17.03.2011
thx alot for ur help so far
this stupid 3d text label still appears above the heads of non admin players.
Where is the error?
Someone knows?
Re: Delete 3d text on spawn!! -
BlackWolf120 - 21.03.2011
Someone has another idea?
Cause this is also unfortunately not working
Pls help, i dont know what else to do anymore