10.03.2017, 17:56
https://sampwiki.blast.hk/wiki/SetPlayerChatBubble
SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime)
Vocк vai precisar de um timer para re-usar a funзгo, pois depois de um tempo (5 segundos como no parвmetro expiretime em seu codigo) o Chat Bubble vai expirar.
Exemplo:
Recomendaria usar foreach. Tambйm existem 3D Text Labels, que recomendaria usar no lugar de ChatBubble: https://sampwiki.blast.hk/wiki/Create3DTextLabel
SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime)
Vocк vai precisar de um timer para re-usar a funзгo, pois depois de um tempo (5 segundos como no parвmetro expiretime em seu codigo) o Chat Bubble vai expirar.
Exemplo:
PHP код:
public OnGameModeInit()
{
SetTimer("ChatBubble", 1000, true);
return 1;
}
forward ChatBubble();
public ChatBubble()
{
for(new i = 0, j = GetPlayerPoolSize(); i <= j; ++i)
{
if(IsPlayerConnected(i))
{
switch (GetPlayerScore(i))
{
case 0: SetPlayerChatBubble( i, "Jogador", 0x1100FFFF, 100.0, 2000 );
case 1: SetPlayerChatBubble( i, "Helper", 0x1100FFFF, 100.0, 2000 );
case 2: SetPlayerChatBubble( i, "Moderador(a)", 0x2DF0A2FF, 100.0, 2000 );
case 3: SetPlayerChatBubble( i, "Administrador(a)", 0x00C40DFF, 100.0, 2000 );
case 4: SetPlayerChatBubble( i, "Diretor(a)", 0xFF9900FF, 100.0, 2000 );
}
}
}
}