[Ajuda] Tag na cabeзa
#1

Galera criei um sistema de clan, sу que estou com 1 problema, quando coloco o sistema de clan no servidor demora 1 pouco as tag comeзa ser setada na cabeзa de vбrios players diferentes, que nгo estгo no clan. Sу tem a tag quem aceitar entra em algum clan. Mais ta bugando ela ta setando em players que nem estгo no clan olha o code. E estгo misturando a tag de um clan em cima de outro, alguйm pode me ajudar ?

pawn Код:
OnPlayerConnect

ClanTagTxd[playerid] = Create3DTextLabel(" ",0x15FF00FF, 30.0, 40.0, 50.0, 20.0, 0);
Attach3DTextLabelToPlayer(ClanTagTxd[playerid], playerid, 0.0, 0.0, 0.4);


stock AtualizarTextoHead(playerid)
{
new TextoToHead[40];
if(Arena[playerid] == 1){
format(TextoToHead,sizeof(TextoToHead),"%i ms{FFFFFF}   {00BEFF}%i FPS",GetPlayerPing(playerid),GetPlayerFPS(playerid));
Update3DTextLabelText(TextoHead[playerid],COLOUR_INFORMACAO,TextoToHead);
}else{
switch (GetPlayerWantedLevel(playerid)){
case 0: Update3DTextLabelText(TextoHead[playerid],COLOUR_ERRO," ");
case 1: Update3DTextLabelText(TextoHead[playerid],COLOUR_ERRO,"RECOMPENSA $10000");
case 2: Update3DTextLabelText(TextoHead[playerid],COLOUR_ERRO,"RECOMPENSA $20000");
case 3: Update3DTextLabelText(TextoHead[playerid],COLOUR_ERRO,"RECOMPENSA $30000");
case 4: Update3DTextLabelText(TextoHead[playerid],COLOUR_ERRO,"RECOMPENSA $40000");
case 5: Update3DTextLabelText(TextoHead[playerid],COLOUR_ERRO,"RECOMPENSA $50000");
case 6: Update3DTextLabelText(TextoHead[playerid],COLOUR_ERRO,"RECOMPENSA $60000");}

//A partir daqui o sistema de Tag do clan <<<<<<<<<<<<<<<<<<<<<<<<<<<<<

new ClanTag[40], pFile[70], gFile[70], clapname[MAX_PLAYER_NAME];
GetPlayerName(playerid, clapname, sizeof(clapname));
format(pFile, sizeof(pFile), "clas/%s.ini", clapname);
format(gFile, sizeof(gFile), "clas/%s.ini", dini_Get(pFile, "cla"));
if(dini_Exists(pFile)){if(strcmp(dini_Get(pFile, "cla"), "Nenhum", false)){
format(ClanTag,sizeof(ClanTag), "Clг: %s", dini_Get(pFile, "cla"));
Update3DTextLabelText(ClanTagTxd[playerid], 0x15FF00FF, ClanTag);}}
if(!dini_Exists(pFile)){
Update3DTextLabelText(ClanTagTxd[playerid], 0x15FF00FF, " ");}
if(dini_Exists(pFile)){
if(strcmp(dini_Get(pFile, "cla"), "Nenhum", true) == 0){
Update3DTextLabelText(ClanTagTxd[playerid], 0x15FF00FF, " ");}}}
return 1;
}
Reply
#2

Vem a ser mais ou menos isso...

PHP код:
if(EstaNoClan[playerid] == 2) {
    
//Cria a 3dlabel
    //Atacha ao player

Reply
#3

Quote:
Originally Posted by Luan Argolo
Посмотреть сообщение
Vem a ser mais ou menos isso...

PHP код:
if(EstaNoClan[playerid] == 2) {
    
//Cria a 3dlabel
    //Atacha ao player

Ficaria assim: ?
pawn Код:
new ClanTag[40], pFile[70], gFile[70], clapname[MAX_PLAYER_NAME];
GetPlayerName(playerid, clapname, sizeof(clapname));
format(pFile, sizeof(pFile), "clas/%s.ini", clapname);
format(gFile, sizeof(gFile), "clas/%s.ini", dini_Get(pFile, "cla"));
if(dini_Exists(pFile))
{
if(strcmp(dini_Get(pFile, "cla"), "Nenhum", false))
{
ClanTagTxd[playerid] = Create3DTextLabel(" ",0x15FF00FF, 30.0, 40.0, 50.0, 20.0, 0);
Attach3DTextLabelToPlayer(ClanTagTxd[playerid], playerid, 0.0, 0.0, 0.4);
format(ClanTag,sizeof(ClanTag), "Clг: %s", dini_Get(pFile, "cla"));
Update3DTextLabelText(ClanTagTxd[playerid], 0x15FF00FF, ClanTag);
}
}
if(!dini_Exists(pFile))
{
Update3DTextLabelText(ClanTagTxd[playerid], 0x15FF00FF, " ");
}
if(dini_Exists(pFile))
{
if(strcmp(dini_Get(pFile, "cla"), "Nenhum", true) == 0)
{
Update3DTextLabelText(ClanTagTxd[playerid], 0x15FF00FF, " ");
}
}
}
return 1;
}
Reply
#4

Se vocк nгo tentar vocк nunca vai saber.
Reply
#5

Quote:
Originally Posted by Luan Argolo
Посмотреть сообщение
Se vocк nгo tentar vocк nunca vai saber.
Nгo funcionou, bugo tudo. Alguйm pode me ajudar ?
Reply
#6

Tem um sistema de familia que й parecido com o sistema que vocк quer.

So aceita a familia se por a Tag(Aparece um dialog na tela Ex:"Mude seu nick para x_Sampianos"

Da uma procurada ai que vocк acha.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)