Como saber Clan [Ayuda]
#1

Hola amigos del samp como puedo saber cual es mi clan con un comando..

por ejemplo:

Con el comando /miclan
Y me salga un mensaje: Tu clan es %s

O en caso contrario si no tiene clan:

Me salga: Ninguno

mi funcion que tengo:

pawn Код:
format(file, sizeof(file), GANG_FILE, i);
if(dini_Exists(file) && dini_Int(file,"GANG_MEMBERS") <= 1)
{
dini_Remove(file);
format(string, sizeof(string), "ID: %d, Miembros: %d, Nombre: %s", i, GangInfo[i][GANG_MEMBERS], GangInfo[i][GANG_NAME]);
SendClientMessage(playerid, COLOR_ROJO, string);
format(string, sizeof(string), "El Clan %s Esta Vacio!", GangInfo[i][GANG_NAME]);
SendClientMessageToAll(COLOR_ROJO, string);
for(new p; p < MAX_PLAYERS; p++)
{
if(PlayerGang[p] == i && IsPlayerConnected(p))
{
dUserSetINT(PlayerName2(playerid)).("clan",0);
PlayerGang[p] = 0;
Reply
#2

Y porque no lo intentas con la variable que identifica si esta en clan o no
Aver intenta asн


pawn Код:
CMD:miclan(playerid,params[])
{
if(PlayerGang[playerid] == 0)
{
SendClientMessage(playerid,-1, "Ninguno");
}
else if(PlayerGang[playerid] == 1)
{
for(new i = 0; i <= ZONE_NUMBER; i++)
{
new file[100],string[128];
format(file, sizeof(file), ZONE_FILE, i);
if(dini_Exists(file) && GangInfo[gangid][GANG_ID] == dini_Int(file,"ZONE_GANGID")) GangInfo[gangid][GANG_NZONE]++;
}
format(string, sizeof(string), "Clan: %s",GangInfo[gangid][GANG_NAME]);
SendClientMessage(playerid,-1, string);
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)