What is the problem here? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is the problem here? (
/showthread.php?tid=243302)
What is the problem here? -
Medal Of Honor team - 22.03.2011
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;
}
Re: What is the problem here? -
Ironboy500[TW] - 22.03.2011
do you receive any errors while compiling script?
Re: What is the problem here? -
armyoftwo - 22.03.2011
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;
}
Re: What is the problem here? -
Medal Of Honor team - 22.03.2011
nope. No error
Re: What is the problem here? -
armyoftwo - 22.03.2011
Quote:
Originally Posted by Medal Of Honor team
nope. No error
|
Did you try my code?
Re: What is the problem here? -
armyoftwo - 22.03.2011
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.
Re: What is the problem here? -
Stigg - 22.03.2011
You could try:
pawn Код:
if(!strcmp(cmdtext, "/gangs", true))
Re: What is the problem here? -
WackoX - 22.03.2011
"this code does not work properly" Then what is the problem? be clear people!
Re: What is the problem here? -
Stigg - 22.03.2011
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.
Re: What is the problem here? -
WackoX - 22.03.2011
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;
}