What is the problem here?
#1

Well, this code does not work properly. Here is the code

pawn Код:
if (strcmp(cmd, "/gangs", true) ==0 )
    {
        for(new count = 20;count<MAX_GANGS;count++)
        {
           
            new str5[128];
           
            if(Gang[count][Ident_ID])
            {
                format( str5, sizeof(str5), "%s", Gang[count][Ident_ID]);
                SendClientMessage(playerid, COLOR_RED, "Available Gangs:");
                SendClientMessage(playerid, COLOR_RED, str5);
                count++;
            }

        }
        return 1;
    }
Reply
#2

do you receive any errors while compiling script?
Reply
#3

pawn Код:
if (strcmp(cmd, "/gangs", true) ==0 )
    {
        for(new count = 20;count<MAX_GANGS;count++)
        {
           
            new str5[128];
           
            if(Gang[count][Ident_ID])
            {
                format( str5, sizeof(str5), "%s%s", str5,Gang[count][Ident_ID]);
                SendClientMessage(playerid, COLOR_RED, "Available Gangs:");
                SendClientMessage(playerid, COLOR_RED, str5);
                count++;
            }

        }
        return 1;
    }
Reply
#4

nope. No error
Reply
#5

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
nope. No error
Did you try my code?
Reply
#6

pawn Код:
if (strcmp(cmd, "/gangs", true) ==0 )
    {
        for(new count = 20;count<MAX_GANGS;count++)
        {
           
            new str5[128];
           
            if(Gang[count][Ident_ID])
            {
                format( str5, sizeof(str5), "%s || %s", str5,Gang[count][Ident_ID]);
                count++;
            }
            SendClientMessage(playerid, COLOR_RED, "Available Gangs:");
            SendClientMessage(playerid, COLOR_RED, str5);
        }
        return 1;
    }
This will be better.
EDIT: sorry for the doublepost, i thought that i pressed edit button. lol.
Reply
#7

You could try:

pawn Код:
if(!strcmp(cmdtext, "/gangs", true))
Reply
#8

"this code does not work properly" Then what is the problem? be clear people!
Reply
#9

Quote:
Originally Posted by WackoX
Посмотреть сообщение
"this code does not work properly" Then what is the problem? be clear people!
Another pointless post, try help someone rather hinder.
Reply
#10

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Another pointless post, try help someone rather hinder.
How am i supposed to fix a ''problem'' if i don't know what the problem is?

pawn Код:
if(!strcmp(cmd, "/gangs", true))
{
    new str5[128];
    SendClientMessage(playerid, COLOR_RED, "Available Gangs:");
    for(new count; count <MAX_GANGS; count++)
    {
        if(Gang[count][Ident_ID])
        {
            format(str5, sizeof(str5), "%s", Gang[count][Ident_ID]);
            SendClientMessage(playerid, COLOR_RED, str5);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)