30.08.2017, 07:39
1.my command is bug
the bug is:i have 1 room deathmatch but if i type 2 room,the sendclientmesseage show but no show (you type wrong room name)
2.the crash detect show this
PHP код:
CMD:dm(PID, params[])
{
new string[128], playerName[MAX_PLAYER_NAME];
GetPlayerName(PID, playerName, sizeof(playerName));
if(InDM[PID] == true) // Once again, if they're in a DM arena.
{
return scm(PID, -1, "You're already in a DM arena. (/dmleave)"); // They can't join if they're already in an arena, that wouldn't make sense.
}
else if(sscanf(params,"i",DM[PID])) return scm(PID, -1, "USAGE: /dm <zoneID> (/dmlist)"); // We use sscanf to look for an integer value provided by the user when they type DM as a command.
{
switch (DM[PID]) // We switch through cases in search of the provided integer. As I said, you can add as many as you like. You could get more in depth and check to see if the DM they provide is valid. But this is a simple tutorial.
{
case 0:
{
InDM[PID] = true;
DM[PID] = 0;
SpawnPlayer(PID);
SetPlayerInterior(playerid, 17);
SetPlayerVirtualWorld(PID, 1);
}
}
format(string, sizeof(string), "{77B3D9}[DM Zones] {ffffff}%s(%i) has just entered {77B3D9}DM zone %i {ffffff}(/dm)", playerName, PID, DM[PID]);
scms(-1, string);
}
return 1;
}
2.the crash detect show this
Quote:
[15:48:56] [debug] Run time error 4: "Array index out of bounds" [15:48:56] [debug] Attempted to read/write array element at negative index -400 [15:48:56] [debug] AMX backtrace: [15:48:56] [debug] #0 00083ea4 in public OnPlayerModelSelection (playerid=0, response=1, listid=5, modelid=552) at C:\Users\cyber\Desktop\pawn v2.0\lel.pwn:1452 [15:48:56] [debug] #1 native CallLocalFunction () from samp-server.exe [15:48:56] [debug] #2 00072648 in public OnPlayerClickPlayerTextDraw (playerid=0, PlayerText ![]() |