11.05.2013, 17:15
So, i have my command:
RPN returns player name, SCM means SendClientMessage
So, my problem is:
When i type in "/chat" it says "SERVER: Unknown command" but when i type in "/chat Hello" it says "Cant find that command"
With crashdetect on it says this stuff in console:
And its doing that with many commands, how to fix that?
RPN returns player name, SCM means SendClientMessage
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/chat", true))
{
new text[180], string[180];
if(PlayerLoggedIn[playerid] == 0) return SCM(playerid, COLOR_GREY, "You arent logged in yet!");
if(sscanf(cmdtext, "s[180]", text)) return SCM(playerid, COLOR_WHITE, "USSAGE: /chat [Text]");
format(string, sizeof(string), "%s says: %s", RPN(playerid), text);
ProxDetector(12.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 1;
}
return SCM(playerid, COLOR_WHITE, "Cant find that command");
}
When i type in "/chat" it says "SERVER: Unknown command" but when i type in "/chat Hello" it says "Cant find that command"
With crashdetect on it says this stuff in console:
Код:
[19:56:27] [join] Nick_Derlos has joined the server (0:192.168.0.15) [19:56:27] [debug] Run time error 4: "Array index out of bounds" [19:56:27] [debug] Accessing element at index 25 past array upper bound 24 [19:56:27] [debug] AMX backtrace: [19:56:27] [debug] #0 00008b7c in ?? () from Intra.amx [19:56:27] [debug] #1 0000abc4 in public Streamer_OnPlayerConnect () from Intra.amx [19:56:27] [debug] #2 native CallLocalFunction () [00471e90] from samp-server.exe [19:56:27] [debug] #3 00007be4 in ?? () from Intra.amx [19:56:27] [debug] #4 00001b9c in public OnPlayerConnect () from Intra.amx [19:56:34] [cmd] Nick_Derlos: /chat [19:56:34] [debug] Run time error 4: "Array index out of bounds" [19:56:34] [debug] Accessing element at index 25 past array upper bound 24 [19:56:34] [debug] AMX backtrace: [19:56:34] [debug] #0 00008b7c in ?? () from Intra.amx [19:56:34] [debug] #1 000329f8 in public OnPlayerCommandText () from Intra.amx [19:56:36] [cmd] Nick_Derlos: /chat tere [19:56:39] [debug] Run time error 4: "Array index out of bounds" [19:56:39] [debug] Accessing element at index 26 past array upper bound 25 [19:56:39] [debug] AMX backtrace: [19:56:39] [debug] #0 0000ef10 in ?? () from Intra.amx [19:56:39] [debug] #1 0000af0c in public Streamer_OnPlayerDisconnect () from Intra.amx [19:56:39] [debug] #2 native CallLocalFunction () [00471e90] from samp-server.exe [19:56:39] [debug] #3 00007c80 in ?? () from Intra.amx [19:56:39] [debug] #4 00001bdc in public OnPlayerDisconnect () from Intra.amx [19:56:39] [part] Nick_Derlos has left the server (0:1)