01.10.2014, 18:35
when someone typing it's removed the attached 3DTextLabel from the guy who typed.
script:
script:
pawn Код:
// In top of the script
new Text3D:BubbleChat;
pawn Код:
public OnPlayerText(playerid, text[])
{
format(String,sizeof(String),"%s says: %s",GetName(playerid),text);
format(String2,sizeof(String2),"%s",text);
Update3DTextLabelText(BubbleChat, 0xFFFFFFFF, String2);
for (new i = 0; i < MAX_PLAYERS; i++){
if(PlayerToPlayer(i,playerid,3)){MSG(i,C_FADE1,String); Attach3DTextLabelToPlayer(BubbleChat, playerid, 0.0, 0.0, 0.4);}
else
if(PlayerToPlayer(i,playerid,6)){MSG(i,C_FADE2,String);}
else
if(PlayerToPlayer(i,playerid,9)){MSG(i,C_FADE3,String);}
else
if(PlayerToPlayer(i,playerid,12)){MSG(i,C_FADE4,String);}
else
if(PlayerToPlayer(i,playerid,15)){MSG(i,C_FADE5,String);}
else
if(PlayerToPlayer(i,playerid,18)){MSG(i,C_FADE6,String);}
else
if(PlayerToPlayer(i,playerid,21)){MSG(i,C_FADE7,String);}
}
return 0;
}