04.04.2018, 15:40
esta dando debug nesse comando /par
Comando
linha do erro
Код:
[debug] Run time error 4: "Array index out of bounds" [debug] AMX backtrace: [debug] #0 002e4c50 in public cmd_par (playerid=16, params[]=@0252d214 "jose set skin 217") at GMNOVA.pwn:45240 [debug] #1 native CallLocalFunction () from samp03svr [debug] #2 0003ef10 in public OnPlayerCommandText (playerid=16, cmdtext[]=@0252d1b0 "/par jose set skin 217")
Код:
CMD:par(playerid, params[]) { new result[128], string[256], giveid; if(sscanf(params, "rs[128]", giveid, result)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ID do Player] [texto]"); if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[giveid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 1 && PlayerInfo[giveid][pHelper] < 1) { SendClientMessage(playerid, COLOR_GREY, "O player que vocк digitou nгo й admin ou Helper!"); return true; } if(IsPlayerConnected(giveid)) { if(HidePM[giveid] > 0) { SendClientMessage(playerid, COLOR_GREY, " Esse player Bloqueou Particulares!"); return true; } if(gettime() < GetPVarInt(playerid, #VarFlood5)) return SendClientMessage(playerid, COLOR_GRAD1, #Vocк nгo pode usar este comando com tanta frequencia); SetPVarInt(playerid, #VarFlood5, gettime()+2); if(giveid == playerid) { format(string, sizeof(string), "(( %s enviou uma particular ))", PlayerName(playerid)); SendClientMessageInRange(5.0, playerid, string, 0x72B8B8AA,0x72B8B8AA,0x72B8B8AA,0x72B8B8AA,0x72B8B8AA); } if(PlayerInfo[playerid][pAdmin] > 0) { format(string, sizeof(string), "Admin: %s(ID: %d) particular: %s", PlayerName(playerid), playerid, result); SendClientMessage(giveid, COLOR_YELLOW, string); format(string, sizeof(string), "Admin: %s para %s: %s", PlayerName(playerid), PlayerName(giveid), result); BPFLogs("particulares", string); } else if(helpertrampando[playerid] == 1) { format(string, sizeof(string), "Helper: %s(ID: %d) particular: %s", PlayerName(playerid), playerid, result); SendClientMessage(giveid, COLOR_YELLOW, string); format(string, sizeof(string), "Helper: %s para %s: %s", PlayerName(playerid), PlayerName(giveid), result); BPFLogs("particulares", string); } else if(PlayerInfo[playerid][pLider] == 7) { format(string, sizeof(string), "Prefeito: %s(ID: %d) particular: %s", PlayerName(playerid), playerid, result); SendClientMessage(giveid, COLOR_YELLOW, string); format(string, sizeof(string), "Prefeito: %s para %s: %s", PlayerName(playerid), PlayerName(giveid), result); BPFLogs("particulares", string); } else { format(string, sizeof(string), "%s(ID: %d) particular: %s", PlayerName(playerid), playerid, result); SendClientMessage(giveid, COLOR_YELLOW, string); format(string, sizeof(string), "Player: %s para %s: %s", PlayerName(playerid), PlayerName(giveid), result); BPFLogs("particulares", string); } foreach(new adm: Player) { if(VerPar[adm] && PlayerInfo[adm][pAdmin] > 0) { format(string, sizeof string, "[PARTICULAR]: %s[ID: %d] para %s[ID: %d]: %s", NomePlayer(playerid),playerid, NomePlayer(giveid),giveid, result); SendClientMessage(adm, COLOR_YELLOW, string); } } print(string); format(string, sizeof(string), "Particular enviada para %s(ID: %d).", PlayerName(giveid), giveid); SendClientMessage(playerid, COLOR_YELLOW, string); return true; } else { SendClientMessage(playerid, COLOR_GRAD1, " Esse player estб off-line."); } return true; }
Код:
if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[giveid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 1 && PlayerInfo[giveid][pHelper] < 1) { SendClientMessage(playerid, COLOR_GREY, "O player que vocк digitou nгo й admin ou Helper!"); return true; }