09.07.2015, 13:45
(
Последний раз редактировалось Glenn332; 09.07.2015 в 20:13.
)
Now I am having the ID 0 bug but it has nothing to do with outdated plugins or includes, as this is happening just for this one command, which is a report CMD but it fully works however when ID 0 makes a report on any other ID he automatically reports himself, Anyone got a clue?
I am using sscanf,
I am using sscanf,
Код:
YCMD:report(playerid, params[], help) { new playa; if(help) { SendClientMessage(playerid, X11_WHITE, "Used for reporting a player"); return 1; } if(!sscanf(params, "k<playerLookup_acc>", playa)) { if(!IsPlayerConnectEx(playa)) { SendClientMessage(playerid, X11_TOMATO_2, "Invalid User!"); return 1; } if(GetPVarInt(playerid, "ReportBanned") == 1) { SendClientMessage(playerid, X11_TOMATO_2, "You are report banned!"); return 1; } if(noreportsystem) { SendClientMessage(playerid, X11_TOMATO_2, "Reports are disabled use /newb"); return 1; } if(IsPlayerConnected(playerid)) { new time = GetPVarInt(playerid, "RequestChatCooldown"); new timenow = gettime(); if(REQUESTCHAT_COOLDOWN-(timenow-time) > 0) { SendClientMessage(playerid, X11_TOMATO_2, "You must wait before sending another report!"); return 1; } SetPVarInt(playerid, "TargetReportID", playa); SendClientMessage(playerid, X11_TOMATO_2, "%s", GetPlayerNameEx(playa, ENameType_CharName)); SetPVarInt(playerid, "RequestChatCooldown", gettime()); ShowPlayerDialog(playerid, EAdminDialog_ShowReportOptions, DIALOG_STYLE_LIST, "Report", "Deathmatch\nFailure to RP\nPowergaming\nMetagaming\nRefund Request\nAdmin Request\nStuck\nAjail Appeal\nServer Advertiser\nUNRP Actions\nTrolling\nHacker", "Accept", "Cancel"); SetPVarInt(playerid, "SentReport", 1); } else { SendClientMessage(playerid, X11_WHITE, "USAGE: /report [ID]"); } } return 1; }