YCMD:ieskomi(playerid, params[], help)
{
new string[60], stringmax[1000], listnumber;
for(new p = 0; p < MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p) && GetPlayerWantedLevel(p) >= 1)
{
listnumber ++;
format(string, 90, "{4a7ccf}%i{ffffff}. {4a7ccf}%s{ffffff}, {4a7ccf}%i", listnumber, getName(p), GetPlayerWantedLevel(p));
strcat(stringmax, string);
}
}
if(isnull(stringmax)) return SendError(playerid, "serveryje nėra pažeidėjų !");
ShowPlayerDialog(playerid,956,DIALOG_STYLE_MSGBOX,"Nr. / ieškomasis / lygiai",stringmax,"Uždaryti","");
return 1;
}
Viskas veikia, bet panaudojus komanda man parodo, jog tokios komandos nėra, nors pasirodo Dialogas su mano vardu ir mano įtarimo lygiais, bei server_log pasipila klaidos, kurios kaip ir nelabai susijusios su tuo.
[04:44:36] [debug] Run time error 6: "Invalid instruction"
[04:44:36] [debug] Unknown opcode 0x482f42c at address 0x00000030
[04:44:36] [debug] AMX backtrace:
[04:44:36] [debug] #0 00000030 in ?? () at C:\Users\Adminas\Desktop\uRPG\pawno\include\float.inc:114
[04:44:36] [debug] #1 native CallRemoteFunction () [00472720] from samp-server.exe
[04:44:36] [debug] #2 00017260 in Command_Add (... <3 variable arguments>) at C:\Users\Adminas\Desktop\uRPG\pawno\include\YSI\y_commands.inc:2503
[04:44:36] [debug] #3 000168a0 in Command_Add (... <2 variable arguments>) at C:\Users\Adminas\Desktop\uRPG\pawno\include\YSI\y_commands.inc:2297
[04:44:36] [debug] #4 00007438 in Command_Add (... <2 variable arguments>) at C:\Users\Adminas\Desktop\uRPG\pawno\include\YSI\y_hooks/impl.inc:929
[04:44:39] [debug] Run time error 6: "Invalid instruction"
[04:44:39] [debug] Unknown opcode 0x482f42c at address 0x00000030
[04:44:39] [debug] AMX backtrace:
[04:44:39] [debug] #0 00000030 in ?? () at C:\Users\Adminas\Desktop\uRPG\pawno\include\float.inc:114
[04:44:39] [debug] #1 native CallRemoteFunction () [00472720] from samp-server.exe
[04:44:39] [debug] #2 00017260 in Command_Add (... <3 variable arguments>) at C:\Users\Adminas\Desktop\uRPG\pawno\include\YSI\y_commands.inc:2503
[04:44:39] [debug] #3 000168a0 in Command_Add (... <2 variable arguments>) at C:\Users\Adminas\Desktop\uRPG\pawno\include\YSI\y_commands.inc:2297
[04:44:39] [debug] #4 00007438 in Command_Add (... <2 variable arguments>) at C:\Users\Adminas\Desktop\uRPG\pawno\include\YSI\y_hooks/impl.inc:929
Norėdamas rašyti pranešimą privalai prisijungti arba užsiregistruoti!
0
Bebras prieš 9 metus
Pridedi print ir žiūri kuris paskutinis bus, pamatęs rašai čia.
YCMD:ieskomi(playerid, params[], help)
{
new string[60], stringmax[1000], listnumber;
print("1");
for(new p = 0; p < MAX_PLAYERS; p++)
{
printf("In loop. %d", i);
if(IsPlayerConnected(p) && GetPlayerWantedLevel(p) >= 1)
{
listnumber ++;
format(string, 90, "{4a7ccf}%i{ffffff}. {4a7ccf}%s{ffffff}, {4a7ccf}%i", listnumber, getName(p), GetPlayerWantedLevel(p));
strcat(stringmax, string);
}
}
printf("End of loop.");
if(isnull(stringmax)) return SendError(playerid, "serveryje nėra pažeidėjų !");
printf("Before dialog.");
ShowPlayerDialog(playerid,956,DIALOG_STYLE_MSGBOX,"Nr. / ieškomasis / lygiai",stringmax,"Uždaryti","");
return 1;
}