SA-MP Forums Archive
Report tokens bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Report tokens bug (/showthread.php?tid=384083)



Report tokens bug - Jassey - 10.10.2012

I have the issues with the accept report command, when i typed cmd /ar the server crashed. What should i do to fix this issues? im using NGRP script sorry im newbie im use this script only for learn scripting.


Re: Report tokens bug - JaKe Elite - 10.10.2012

give the command code.

OFFT: Don't use NGRP.


Re: Report tokens bug - Roel - 10.10.2012

If you want to learn scripting, then please don't use a script like that, use a simple gamemode (not roleplay).
And start editing it.


Re: Report tokens bug - Jassey - 10.10.2012

Quote:
Originally Posted by Romel
Посмотреть сообщение
give the command code.

OFFT: Don't use NGRP.
I use this only learn for scripting man, can you help me to fix it?


Re: Report tokens bug - Riddick94 - 10.10.2012

Quote:
Originally Posted by Jassey
Посмотреть сообщение
I use this only learn for scripting man, can you help me to fix it?
No, we can't until you give us a code of this command.


Re: Report tokens bug - BlueGames - 10.10.2012

No one can help you without see that isuus you sould post it.
Use
Код:
 [pawn][/ pawn]
. Remove the space after /.


Re: Report tokens bug - Jassey - 10.10.2012

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
No, we can't until you give us a code of this command.
This is the code
Код:
CMD:ar(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 2)
	{
		new string[128], reportid;
		if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE, "Gunakan: /ar [reportid]");

		if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, "   Report ID tidak dapat kurang dari 0 juga tidak dapat lebih dari 999!"); return 1; }
		if(Reports[reportid][BeingUsed] == 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "   ID Report itu tidak digunakan, atau ID Report itu telah diterima/tolak oleh admin lain!");
			return 1;
		}
		if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
		{
			SendClientMessageEx(playerid, COLOR_GREY, "   Pengirim report telah tidak ada!");
			Reports[reportid][ReportFrom] = 999;
			Reports[reportid][BeingUsed] = 0;
			return 1;
		}
		format(string, sizeof(string), "[REPORT] %s telah menerima report dari %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
		ABroadCast(COLOR_ORANGE, string, 2);
		AddReportToken(playerid); // Report Tokens
		format(string, sizeof(string), "Report yang kamu kirim telah diterima oleh %s, harap tunggu jangan lakukan report lagi.", GetPlayerNameEx(playerid));
		SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
		PlayerInfo[playerid][pAcceptReport]++;
		Reports[reportid][ReportFrom] = 999;
		Reports[reportid][ReplyTimerr] = SetTimerEx("ReplyTimer", 30000, 0, "d", reportid);
		Reports[reportid][CheckingReport] = playerid;
		Reports[reportid][BeingUsed] = 0;
		Reports[reportid][TimeToExpire] = 0;
		strmid(Reports[reportid][Report], "None", 0, 4, 4);
	}
	return 1;
}



Re: Report tokens bug - CmZxC - 10.10.2012

comment out the "AddReportToken(playerid);".
I remember NGRP script having issues with tokens

by comment out i mean
pawn Код:
// AddReportToken(playerid);
PS:
using an old NGRP script like that will lead you and your server nowhere, the gamemode itself is a huge bug.


Re: Report tokens bug - Jassey - 10.10.2012

Quote:
Originally Posted by CmZxC
Посмотреть сообщение
comment out the "AddReportToken(playerid);".
I remember NGRP script having issues with tokens

by comment out i mean
pawn Код:
// AddReportToken(playerid);
PS:
using an old NGRP script like that will lead you and your server nowhere, the gamemode itself is a huge bug.
But if i delete the "AddReportToken(playerid);" /reply cmd cannot working after admins accept the report, how can i fix it?