Shutting down!
#1

Код:
[12:11:28] [debug] Server crashed while executing ATRP.amx
[12:11:28] [debug] AMX backtrace:
[12:11:28] [debug] #0 native fread () [004057a0] from samp-server.exe
[12:11:28] [debug] #1 00265188 in ?? () from ATRP.amx
[12:11:28] [debug] #2 005448b8 in public ServerHeartbeatba () from ATRP.amx
[12:11:28] [debug] System backtrace:
[12:11:29] [debug] #0 00492860 in ?? () from C:\Documents and Settings\Administrator\Desktop\VN-PAC (AT-RP)\VN-PAC (AT-RP)\samp-server.exe
[12:11:29] [debug] #1 00492e90 in ?? () from C:\Documents and Settings\Administrator\Desktop\VN-PAC (AT-RP)\VN-PAC (AT-RP)\samp-server.exe
Код:
task ServerHeartbeatba[1000]() {
    static string[128];
	foreach(new i: Player)
	{
		if(playerTabbed[i] == 0) {
			switch(PlayerInfo[i][pLevel]) {
				case 0 .. 2: PlayerInfo[i][pPayCheck] += 1;
				case 3 .. 4: PlayerInfo[i][pPayCheck] += 2;
				case 5 .. 6: PlayerInfo[i][pPayCheck] += 3;
				case 7 .. 8: PlayerInfo[i][pPayCheck] += 4;
				case 9 .. 10: PlayerInfo[i][pPayCheck] += 5;
				case 11 .. 12: PlayerInfo[i][pPayCheck] += 6;
				case 13 .. 14: PlayerInfo[i][pPayCheck] += 7;
				case 15 .. 16: PlayerInfo[i][pPayCheck] += 8;
				case 17 .. 18: PlayerInfo[i][pPayCheck] += 9;
				case 19 .. 20: PlayerInfo[i][pPayCheck] += 10;
				default: PlayerInfo[i][pPayCheck] += 11;
			}
			if(++PlayerInfo[i][pConnectSeconds] >= 3600) {
				PayDay(i);
			}
		}
        if (DangDieuTra[i] != 0)
	    {
			if (DieuTraLimit[i] > 1)
			{
			    DieuTraLimit[i]--;
			    if (IsPlayerInRangeOfPoint(i, 2.0, GetPVarFloat(i, "pDieuTraX"), GetPVarFloat(i, "pDieuTraY"), GetPVarFloat(i, "pDieuTraZ")))
				{

				    DieuTraCountDown[i]--;
				    if (DieuTraCountDown[i] > 0)
				    {
						format(string, sizeof(string), "Thoi gian con lai~n~~y~%d", DieuTraCountDown[i]);
				    	GameTextForPlayer(i, string, 900, 6);
				    }
					else if (DieuTraCountDown[i] == 0) //thanh cong
					{
				    	new killer = GetKillerID[DieuTraVictim[i]];
				    	if (killer == INVALID_PLAYER_ID)
						{
						    SendClientMessage(i, COLOR_WHITE, "Thu pham khong ton tai (da thoat)");
						    DieuTraVictim[i] = INVALID_PLAYER_ID;
		    				DangDieuTra[i] = 0;
		    				DieuTraCountDown[i] = 0;
		    				DieuTraLimit[i] = 0;
						}
						else
						{
							format(string, sizeof(string), "Hung thu co so CMND la %d", killer);
							SendClientMessage(i, COLOR_LIGHTBLUE, "***** Dieu tra thanh cong *****");
					    	SendClientMessage(i, COLOR_LIGHTGREEN, string);
					    	SendClientMessage(killer, COLOR_LIGHTRED, "Canh sat da tim ra ban la thu pham trong vu giet nguoi");
					    	SetPlayerWantedLevel(killer, GetPlayerWantedLevel(killer) + 1);
	    					PlayerInfo[killer][pCrimes]++;
							AddCrime(i, killer, "Giet nguoi");
					    	PlayerInfo[killer][pWantedLevel]++;
					    	format(string, sizeof(string), "** DISPATCH: Nhan vien %s da tim ra %s la thu pham cua 1 vu giet nguoi", GetPlayerNameEx(i), GetPlayerNameEx(killer));
					    	foreach (new p: Player)
					    	{
					    	    if (IsACop(p))
					    	    {
					    	        SendClientMessage(p, COLOR_DBLUE, string);
					    	        SendClientMessage(p, COLOR_LIGHTBLUE, "Hay kiem tra danh sach truy na.");
								}
					    	}
	    					DangDieuTra[i] = 0;
	    					DieuTraVictim[i] = INVALID_PLAYER_ID;
			    			DangDieuTra[i] = 0;
			    			DieuTraCountDown[i] = 0;
			    			DieuTraLimit[i] = 0;
		    			}
					}
				}
			}
			else if (DieuTraLimit[i] == 1 && DangDieuTra[i] == 1)
			{
			    SendClientMessage(i, COLOR_GREY, "Ban da that bai trong viec tim kiem thu pham");
			    DangDieuTra[i] = 0;
			}
		}
		/*if (GetPVarInt(i, "MailTime") > 0)
			SetPVarInt(i, "MailTime", GetPVarInt(i, "MailTime") - 1);
		else
			DeletePVar(i, "MailTime");*/

		if(PlayerInfo[i][pJudgeJailType] != 0 && PlayerInfo[i][pJudgeJailTime] > 0 && !PlayerInfo[i][pBeingSentenced]) PlayerInfo[i][pJudgeJailTime]--;
		if(PlayerInfo[i][pJudgeJailTime] <= 0 && PlayerInfo[i][pJudgeJailType] != 0) PlayerInfo[i][pJudgeJailType] = 0;
		if(PlayerInfo[i][pJailTime] > 0 && --PlayerInfo[i][pJailTime] <= 0) {
			if(strfind(PlayerInfo[i][pPrisonReason], "[IC]", true) != -1 || strfind(PlayerInfo[i][pPrisonReason], "[ISOLATE]", true) != -1) {
	   			SetPlayerInterior(i, 0);
				PlayerInfo[i][pInt] = 0;
				SetPlayerVirtualWorld(i, 0);
				PlayerInfo[i][pVW] = 0;
				SetPlayerPos(i, 1745.5969, 396.6139, 19.0345);
			}
			else {
			 	SetPlayerInterior(i, 0);
				PlayerInfo[i][pInt] = 0;
				SetPlayerVirtualWorld(i, 0);
				PlayerInfo[i][pVW] = 0;
	    		SetPlayerPos(i, 1544.5059,-1675.5673,13.5585);
			}
			PlayerInfo[i][pJailTime] = 0;
			PhoneOnline[i] = 0;
			SendClientMessageEx(i, COLOR_GRAD1,"   Ban da hoan thanh het nghia vu.");
			GameTextForPlayer(i, "~g~Tu do~n~~w~Hay co gang la mot cong dan tot", 5000, 1);
			ClearCrimes(i);
			strcpy(PlayerInfo[i][pPrisonReason], "None", 128);
			SetPlayerToTeamColor(i);
		}
		if(CommandSpamTimes[i] != 0)
		{
			CommandSpamTimes[i]--;
		}
		if(TextSpamTimes[i] != 0)
		{
			TextSpamTimes[i]--;
		}
		if(UsedFind[i] >= 1) --UsedFind[i];
		if(PlayerInfo[i][pMechTime] > 0) PlayerInfo[i][pMechTime]--;
		if(PlayerInfo[i][pLawyerTime] > 0) PlayerInfo[i][pLawyerTime]--;
		if(PlayerInfo[i][pDrugsTime] > 0) PlayerInfo[i][pDrugsTime]--;
		if(PlayerInfo[i][pRMuted] == 2) {
			PlayerInfo[i][pRMutedTime]--;
			if(PlayerInfo[i][pRMutedTime] <= 0) {
				PlayerInfo[i][pRMuted] = 0;
			}
		}
		if(PlayerInfo[i][pVMuted] == 2) {
			PlayerInfo[i][pVMutedTime]--;
			if(PlayerInfo[i][pVMutedTime] <= 0) {
				PlayerInfo[i][pVMuted] = 0;
			}
		}

		if(GetPVarType(i, "hFind"))
		{
		    new Float:X, Float:Y, Float:Z, pID = GetPVarInt(i, "hFind");
		    if(IsPlayerConnected(pID))
		    {
			    GetPlayerPos(pID, X, Y, Z);
			    SetPlayerCheckpoint(i, X, Y, Z, 4.0);
			}
		}

		if(WantLawyer[i] >= 1)
		{
			CallLawyer[i] = 111;
			if(WantLawyer[i] == 1)
			{
				SendClientMessageEx(i, COLOR_LIGHTRED, "Ban co muon mot luat su? (Go 'yes' hoac 'no')");
			}
			WantLawyer[i] ++;
			if(WantLawyer[i] == 8)
			{
				SendClientMessageEx(i, COLOR_LIGHTRED, "Ban co muon mot luat su? (Go 'yes' hoac 'no')");
			}
			if(WantLawyer[i] == 15)
			{
				SendClientMessageEx(i, COLOR_LIGHTRED, "Ban co muon mot luat su? (Go 'yes' hoac 'no')");
			}
			if(WantLawyer[i] == 20)
			{
				SendClientMessageEx(i, COLOR_LIGHTRED, "Khong co luat su nao lam nhiem vu! Thoi gian o tu bat dau.");
				WantLawyer[i] = 0;
				CallLawyer[i] = 0;
			}
		}
	}
}
i don't know what to do
Reply
#2

Show us your compile log when you compiled this.
Reply
#3

stay in one topic
https://sampforum.blast.hk/showthread.php?tid=455778
lock this
Reply
#4

-fail sorry- -removed-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)