TU SCORE DEBE SER MAS DE 2000 PARA CREAR UN CLAN!
/Clan info /Clan entrar /Clan salir y los comandos que son para el jugador publico!
if(!strcmp(cmd, "/clan", true))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, BLANCO, "Usa: /clan [crear, invitar, rechazar, entrar, salir, expulsar, info, color, colorh] [TAG] [Nombre]");
//-----------------------------------------------
new Tienescore = GetPlayerScore(playerid);
if(Tienescore >= 2000)
{
} else { //Forma uno qe salga el mensaje y si funciona!
SendClientMessage(playerid, ROJO, "Tu score debe ser >= 2000 para poder crear un CLAN.");
return 1;
}
//-----------------------------------------------
if(!strcmp(tmp, "crear", true))
{
if(Ingresado[playerid] == false) return SendClientMessage(playerid, ROJO, "Necesitas estar logueado para usar este comando");
if(EnClan[playerid] == true) return SendClientMessage(playerid, ROJO, "<Info> Ya tienes clan");
tmp2 = strtok(cmdtext, idx);
tmp3 = strrest(cmdtext, idx);
if(!strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, BLANCO, "Usa: /clan crear [TAG] [Nombre]");
if(strlen(tmp2) < 1 || strlen(tmp2) > 3) return SendClientMessage(playerid, ROJO, "<Info> El TAG debe ser de 1 a 3 Caracteres");
if(strlen(tmp3) < 3 || strlen(tmp3) > 24) return SendClientMessage(playerid, ROJO, "<Info> El Nombre debe ser de 3 a 24 caracteres");
if(strfind(tmp2, "[", true) != -1 || strfind(tmp2, "]", true) != -1)
{
return SendClientMessage(playerid, ROJO, "Sin '[' ']' (corchetes).");
}
format(Archivo, sizeof Archivo, "Clanes/%s.ini", tmp2);
if(!dini_Exists(Archivo))
{
format(Clan_TAG[playerid], 4, "%s", tmp2);
Clan_ID[playerid] = dini_Int("Clan.ini", "Clan_IDs") + 1;
dini_IntSet("Clan.ini", "Clan_IDs", Clan_ID[playerid]);
dini_Create(Archivo);
dini_IntSet(Archivo, "ID", Clan_ID[playerid]);
dini_Set(Archivo, "Nombre", tmp3);
dini_Set(Archivo, "TAG", tmp2);
dini_IntSet(Archivo, "Color", 0);
dini_Set(Archivo, "Lider", Nickname[playerid]);
dini_IntSet(Archivo, "Miembros", 1);
dini_IntSet(Archivo, "Asesinatos", 0);
dini_IntSet(Archivo, "Muertes", 0);
dini_FloatSet(Archivo, "Ratio", 0.0);
dini_Set(Archivo, "Miembro_1", Nickname[playerid]);
for(new l = 2; l < 21; l++)
{
format(string, sizeof string, "Miembro_%d", l);
dini_Set(Archivo, string, "<Vacio>");
}
format(Archivo, sizeof Archivo, "Jugadores/%s.ini", Nickname[playerid]);
dini_Set(Archivo, "Clan", Clan_TAG[playerid]);
file = fopen("Clanes.txt", io_append);
format(string, sizeof(string), "%s;\r\n", Clan_TAG[playerid]);
fwrite(file, string);
fclose(file);
format(Nick, sizeof Nick, "[%s]%s", Clan_TAG[playerid], Nickname[playerid]);
SetPlayerName(playerid, Nick);
SetPlayerColor(playerid, 0);
EnClan[playerid] = true;
format(string, sizeof string, "Has creado el clan '%s' TAG: [%s]", tmp3, tmp2);
SendClientMessage(playerid, CELESTE, string);
SendClientMessage(playerid, NARANJA, "Usa /clan color/colorh para cambiar el color de tu clan");
} else {
SendClientMessage(playerid , ROJO, "<Info> El TAG ya estб en uso");
}
return 1;
}
if(!strcmp(cmd, "/clan", true))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, BLANCO, "Usa: /clan [crear, invitar, rechazar, entrar, salir, expulsar, info, color, colorh] [TAG] [Nombre]");
//-----------------------------------------------
new Tienescore = GetPlayerScore(playerid);
if(Tienescore >= 2000)
{
//-----------------------------------------------
if(!strcmp(tmp, "crear", true))
{
if(Ingresado[playerid] == false) return SendClientMessage(playerid, ROJO, "Necesitas estar logueado para usar este comando");
if(EnClan[playerid] == true) return SendClientMessage(playerid, ROJO, "<Info> Ya tienes clan");
tmp2 = strtok(cmdtext, idx);
tmp3 = strrest(cmdtext, idx);
if(!strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, BLANCO, "Usa: /clan crear [TAG] [Nombre]");
if(strlen(tmp2) < 1 || strlen(tmp2) > 3) return SendClientMessage(playerid, ROJO, "<Info> El TAG debe ser de 1 a 3 Caracteres");
if(strlen(tmp3) < 3 || strlen(tmp3) > 24) return SendClientMessage(playerid, ROJO, "<Info> El Nombre debe ser de 3 a 24 caracteres");
if(strfind(tmp2, "[", true) != -1 || strfind(tmp2, "]", true) != -1)
{
return SendClientMessage(playerid, ROJO, "Sin '[' ']' (corchetes).");
}
format(Archivo, sizeof Archivo, "Clanes/%s.ini", tmp2);
if(!dini_Exists(Archivo))
{
format(Clan_TAG[playerid], 4, "%s", tmp2);
Clan_ID[playerid] = dini_Int("Clan.ini", "Clan_IDs") + 1;
dini_IntSet("Clan.ini", "Clan_IDs", Clan_ID[playerid]);
dini_Create(Archivo);
dini_IntSet(Archivo, "ID", Clan_ID[playerid]);
dini_Set(Archivo, "Nombre", tmp3);
dini_Set(Archivo, "TAG", tmp2);
dini_IntSet(Archivo, "Color", 0);
dini_Set(Archivo, "Lider", Nickname[playerid]);
dini_IntSet(Archivo, "Miembros", 1);
dini_IntSet(Archivo, "Asesinatos", 0);
dini_IntSet(Archivo, "Muertes", 0);
dini_FloatSet(Archivo, "Ratio", 0.0);
dini_Set(Archivo, "Miembro_1", Nickname[playerid]);
for(new l = 2; l < 21; l++)
{
format(string, sizeof string, "Miembro_%d", l);
dini_Set(Archivo, string, "<Vacio>");
}
format(Archivo, sizeof Archivo, "Jugadores/%s.ini", Nickname[playerid]);
dini_Set(Archivo, "Clan", Clan_TAG[playerid]);
file = fopen("Clanes.txt", io_append);
format(string, sizeof(string), "%s;\r\n", Clan_TAG[playerid]);
fwrite(file, string);
fclose(file);
format(Nick, sizeof Nick, "[%s]%s", Clan_TAG[playerid], Nickname[playerid]);
SetPlayerName(playerid, Nick);
SetPlayerColor(playerid, 0);
EnClan[playerid] = true;
format(string, sizeof string, "Has creado el clan '%s' TAG: [%s]", tmp3, tmp2);
SendClientMessage(playerid, CELESTE, string);
SendClientMessage(playerid, NARANJA, "Usa /clan color/colorh para cambiar el color de tu clan");
} else {
SendClientMessage(playerid , ROJO, "<Info> El TAG ya estб en uso");
}
} else {
SendClientMessage(playerid, ROJO, "Tu score debe ser >= 2000 para poder crear un CLAN."); //Aqui el mensaje
}
return 1;
}
new Tienescore1 = GetPlayerScore(playerid);
if(Tienescore1 == 0)
{
} else {
SendClientMessage(playerid, ROJO, "");
return 1;
}
if(!strcmp(cmd, "/clan", true))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, BLANCO, "Usa: /clan [crear, invitar, rechazar, entrar, salir, expulsar, info, color, colorh] [TAG] [Nombre]");
//-----------------------------------------------
new Tienescore = GetPlayerScore(playerid);
}
//-----------------------------------------------
if(!strcmp(tmp, "crear", true))
{
if(Ingresado[playerid] == false) return SendClientMessage(playerid, ROJO, "Necesitas estar logueado para usar este comando");
if(Tienescore<=2000) return SendClientMessage(playerid,Rojo,"Tu score debe ser >= 2000 para poder crear un CLAN.");
if(EnClan[playerid] == true) return SendClientMessage(playerid, ROJO, "<Info> Ya tienes clan");
tmp2 = strtok(cmdtext, idx);
tmp3 = strrest(cmdtext, idx);
if(!strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, BLANCO, "Usa: /clan crear [TAG] [Nombre]");
if(strlen(tmp2) < 1 || strlen(tmp2) > 3) return SendClientMessage(playerid, ROJO, "<Info> El TAG debe ser de 1 a 3 Caracteres");
if(strlen(tmp3) < 3 || strlen(tmp3) > 24) return SendClientMessage(playerid, ROJO, "<Info> El Nombre debe ser de 3 a 24 caracteres");
if(strfind(tmp2, "[", true) != -1 || strfind(tmp2, "]", true) != -1)
{
return SendClientMessage(playerid, ROJO, "Sin '[' ']' (corchetes).");
}
format(Archivo, sizeof Archivo, "Clanes/%s.ini", tmp2);
if(!dini_Exists(Archivo))
{
format(Clan_TAG[playerid], 4, "%s", tmp2);
Clan_ID[playerid] = dini_Int("Clan.ini", "Clan_IDs") + 1;
dini_IntSet("Clan.ini", "Clan_IDs", Clan_ID[playerid]);
dini_Create(Archivo);
dini_IntSet(Archivo, "ID", Clan_ID[playerid]);
dini_Set(Archivo, "Nombre", tmp3);
dini_Set(Archivo, "TAG", tmp2);
dini_IntSet(Archivo, "Color", 0);
dini_Set(Archivo, "Lider", Nickname[playerid]);
dini_IntSet(Archivo, "Miembros", 1);
dini_IntSet(Archivo, "Asesinatos", 0);
dini_IntSet(Archivo, "Muertes", 0);
dini_FloatSet(Archivo, "Ratio", 0.0);
dini_Set(Archivo, "Miembro_1", Nickname[playerid]);
for(new l = 2; l < 21; l++)
{
format(string, sizeof string, "Miembro_%d", l);
dini_Set(Archivo, string, "<Vacio>");
}
format(Archivo, sizeof Archivo, "Jugadores/%s.ini", Nickname[playerid]);
dini_Set(Archivo, "Clan", Clan_TAG[playerid]);
file = fopen("Clanes.txt", io_append);
format(string, sizeof(string), "%s;\r\n", Clan_TAG[playerid]);
fwrite(file, string);
fclose(file);
format(Nick, sizeof Nick, "[%s]%s", Clan_TAG[playerid], Nickname[playerid]);
SetPlayerName(playerid, Nick);
SetPlayerColor(playerid, 0);
EnClan[playerid] = true;
format(string, sizeof string, "Has creado el clan '%s' TAG: [%s]", tmp3, tmp2);
SendClientMessage(playerid, CELESTE, string);
SendClientMessage(playerid, NARANJA, "Usa /clan color/colorh para cambiar el color de tu clan");
} else {
SendClientMessage(playerid , ROJO, "<Info> El TAG ya estб en uso");
}
return 1;
}
|
Prueba Ahi
pawn Код:
Saludos ![]() |

|
Casi bien pero creo que te sobro un }
Porcierto ConecCionMex podias publicar el sistema de clanes ![]() Iva a hacer uno pero nunca encuentro tiempo ni ganas xD |
new Tienescore = GetPlayerScore(playerid);
}
if(!strcmp(tmp, "crear", true))
{