[Ajuda]Texto em cima do player -
keller012 - 08.11.2010
Eu queria colocar um texto em cima do player quando ele ficar afk
Axo que chama 3DTextLabel
й isso
como eu faзo??
Re: [Ajuda]Texto em cima do player -
Macintosh - 08.11.2010
Sim posta um 3DTextLabel no cуdigo /afk '-'
tem muitos tutoriais aqui no fуrum sa-mp ensinando a por 3DTextLabel
Re: [Ajuda]Texto em cima do player -
TiagoPS - 08.11.2010
pawn Код:
SetPlayerChatBubble(playerid,"Texto", COR, DISTANCIA QUE OS OUTROS VERГO, TEMPO PARA EXPIRAR);
Re: [Ajuda]Texto em cima do player -
Macintosh - 08.11.2010
No caso
pawn Код:
if(strcmp(cmd, "/afk", true) == 0)
{
new string[256];
SetPlayerHealth(playerid, 99999);
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "[AVISO]%s Estб AFK (/afk)", PlayerName);
SendClientMessageToAll(0xF6F6F6AA string);
SetPlayerChatBubble(playerid,"AFK", 0xF6F6F6AA, X,Y,Z, 4000);//Й EM MILISEGUNDOS?
return 1;
}
Tenta...
Re: [Ajuda]Texto em cima do player -
keller012 - 08.11.2010
tipo
deu certo isso
so que eu tentei fazer com que quando digitasse /afk ficasse com a vida infinita
para que ninguem posa mata-lo.
E depois quando sair do /afk voltava a vida para a que estava antes de entrar afk.
Eu fiz da seguinte forma:
A vida ta setando infinito, so que na hora de volta para normal envez de voltar a vida para a que estava antes de digitar /afk, ele mata o player...
alguem sabe a solucao
Код:
if (strcmp("/afk", cmdtext, true, 10) == 0)
{
new Float:health;
if(Afk[playerid]==0)
{
new Name[24];
new string22[50];
Afk[playerid]=1;
Timer[playerid] = SetTimer("SendMessage",100,0);
// SetPlayerVirtualWorld(playerid, 11);
TogglePlayerControllable(playerid,0);
GetPlayerName(playerid, Name, 24);
format(string22, sizeof(string22), "%s estб afk", Name);
SendClientMessageToAll(0x33CCFFAA, string22);
SendClientMessage(playerid,0xFF0000AA, "Vocк estб no modo AFK, para sair digite /afk");
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, INFINITY);
SetPlayerChatBubble(playerid,"AFK", 0xF6F6F6AA, 100.0, 4000);//Й EM MILISEGUNDOS?
}
else if(Afk[playerid]==1)
{
new Name[24];
new string11[50];
Afk[playerid]=0;
Timer[playerid] = SetTimer("SendMessage",100,0);
// SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
GetPlayerName(playerid, Name, 24);
format(string11, sizeof(string11), "%s voltou para o server", Name);
SendClientMessageToAll(0x33CCFFAA, string11);
SetPlayerHealth(playerid, health);
SendClientMessage(playerid,0xFF0000AA, "Vocк voltou para o servidor.");
}
return 1;
}
Re: [Ajuda]Texto em cima do player -
Macintosh - 08.11.2010
Eu acho que vocк definiu o new health = 0;
pawn Код:
if (strcmp("/afk", cmdtext, true, 10) == 0)
{
new Float:health;
if(Afk[playerid]==0)
{
new Name[24];
new string22[50];
Afk[playerid]=1;
Timer[playerid] = SetTimer("SendMessage",100,0);
// SetPlayerVirtualWorld(playerid, 11);
TogglePlayerControllable(playerid,0);
GetPlayerName(playerid, Name, 24);
format(string22, sizeof(string22), "%s estб afk", Name);
SendClientMessageToAll(0x33CCFFAA, string22);
SendClientMessage(playerid,0xFF0000AA, "Vocк estб no modo AFK, para sair digite /afk");
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, INFINITY);
SetPlayerChatBubble(playerid,"AFK", 0xF6F6F6AA, 100.0, 4000);//Й EM MILISEGUNDOS?
}
else if(Afk[playerid]==1)
{
new Name[24];
new string11[50];
Afk[playerid]=0;
Timer[playerid] = SetTimer("SendMessage",100,0);
// SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
GetPlayerName(playerid, Name, 24);
format(string11, sizeof(string11), "%s voltou para o server", Name);
SendClientMessageToAll(0x33CCFFAA, string11);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,0xFF0000AA, "Vocк voltou para o servidor.");
}
return 1;
}
Sу Copy e Paste
Re: [Ajuda]Texto em cima do player -
keller012 - 08.11.2010
so que desse jeito que voce fez
vai deixar a vida full do cara
ai os caras podem entrar afk pra volta a vida
tinha que pega a vida dele antes de entrar afk
e setar quando ele sair do afk
Re: [Ajuda]Texto em cima do player -
Macintosh - 08.11.2010
Nгo.
Nada a ver.
99999 - Vida Infinita (Ele fica de god)
100 - Vida Normal (Ele perde life)
Tente!
Re: [Ajuda]Texto em cima do player -
keller012 - 08.11.2010
tipo lucas
se o cara ta com 50 de vida antes de digita /afk
ele vai pra 99999
ai ele digita /afk de novo
e sai do afk com a vida 100
ai o cara vai fica entrando no afk pra recupera life
ele tem que entra com 50
i pra 99999
ai quando ele sai
seta pra 50 de novo
entendeu
Re: [Ajuda]Texto em cima do player -
[FeK]Falcon_Sixe - 08.11.2010
Posta o seu /admins ae nй...