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;
}
if(EstaNoClan[playerid] == 2) {
//Cria a 3dlabel
//Atacha ao player
}
Vem a ser mais ou menos isso...
PHP код:
|
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;
}