28.05.2015, 18:27
if(strcmp("/topgangs", cmdtext, true, 10) == 0)
{
if(InDm[playerid] >= 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR:You can't use this command in a dm/event.");
if(InDm[playerid] == 0)
{
new string[1000], string2[556];
strcat(string, string2);
format(string2, 556, "{ff0000}Top 10 Gangs\n", gang1gp); strcat(string, string2);
if(gang1gp >= gang2gp && gang3gp)
{
format(string2, 556, "{FF0000}1 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang2gp >= gang1gp && gang3gp)
{
format(string2, 556, "{FF0000}1 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang3gp >= gang1gp && gang2gp)
{
format(string2, 556, "{FF0000}1 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
if(gang1gp >= gang2gp <= gang3gp)
{
format(string2, 556, "{FF0000}2 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang1gp <= gang2gp >= gang3gp)
{
format(string2, 556, "{FF0000}2 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang2gp >= gang1gp <= gang3gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang2gp <= gang1gp >= gang3gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang3gp >= gang1gp <= gang2gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
if(gang3gp <= gang1gp >= gang2gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
if(gang1gp <= gang2gp && gang3gp)
{
format(string2, 556, "{FF0000}3 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang2gp <= gang1gp && gang3gp)
{
format(string2, 556, "{FF0000}3 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang3gp <= gang1gp && gang2gp)
{
format(string2, 556, "{FF0000}3 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
format(string2, 556, "{FF0000}Top 10 Gangs\n"), strcat(string2,"" );
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, string2, string, "Close", "");
}
return 1;
}
I need help to set it like a top with out bugs top1 top2 top3
{
if(InDm[playerid] >= 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR:You can't use this command in a dm/event.");
if(InDm[playerid] == 0)
{
new string[1000], string2[556];
strcat(string, string2);
format(string2, 556, "{ff0000}Top 10 Gangs\n", gang1gp); strcat(string, string2);
if(gang1gp >= gang2gp && gang3gp)
{
format(string2, 556, "{FF0000}1 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang2gp >= gang1gp && gang3gp)
{
format(string2, 556, "{FF0000}1 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang3gp >= gang1gp && gang2gp)
{
format(string2, 556, "{FF0000}1 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
if(gang1gp >= gang2gp <= gang3gp)
{
format(string2, 556, "{FF0000}2 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang1gp <= gang2gp >= gang3gp)
{
format(string2, 556, "{FF0000}2 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang2gp >= gang1gp <= gang3gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang2gp <= gang1gp >= gang3gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang3gp >= gang1gp <= gang2gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
if(gang3gp <= gang1gp >= gang2gp)
{
format(string2, 556, "{FF0000}2 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
if(gang1gp <= gang2gp && gang3gp)
{
format(string2, 556, "{FF0000}3 {ffffff}United Pirates Castle: {ff0000}%d\n", gang1gp); strcat(string, string2);
}
if(gang2gp <= gang1gp && gang3gp)
{
format(string2, 556, "{FF0000}3 {F7FF00}The Other Side: {ff0000}%d\n", gang2gp), strcat(string, string2);
}
if(gang3gp <= gang1gp && gang2gp)
{
format(string2, 556, "{FF0000}3 {F7FF00}Unknow Legends: {ff0000}%d\n", gang3gp), strcat(string, string2);
}
format(string2, 556, "{FF0000}Top 10 Gangs\n"), strcat(string2,"" );
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, string2, string, "Close", "");
}
return 1;
}
I need help to set it like a top with out bugs top1 top2 top3