if(GetPVarInt(i, "RamHouse") > 0) { if(IsPlayerInRangeOfPoint(i,2.0, HouseInfo[GetPVarInt(i, "RamHouseID")][hXo], HouseInfo[GetPVarInt(i, "RamHouseID")][hYo], HouseInfo[GetPVarInt(i, "RamHouseID")][hZo])) { SetPVarInt(i, "RamHouse", GetPVarInt(i, "RamHouse")+1); /*format(string, sizeof(string),"~w~%d", GetPVarInt(i, "RamHouse")); GameTextForPlayer(i, string, 1000, 6);*/ if(GetPVarInt(i, "RamHouse") == 21) { ApplyAnimation(i, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0); SetPVarInt(i,"Uncoding", 1); SetPVarInt(i,"UnCodeRound", 1); ProgressBar(i, "UNCODING...", 25, 4); HouseHasCCTV(i); format(string,sizeof(string),"If you have not done when the time's end, you will be sent to next round.\nIf you have two losing streak, you will be failed and reported!\n\nPlease type the code (A-Z mixed with 0-9): %s",PlayerInfo[i][pUncode]); format(string,sizeof(string),"Uncoding... Source: %d:%d",GetPVarInt(i, "PassedCode"),GetPVarInt(i, "FailedCode")); ShowPlayerDialog(i,DIALOG_UNCODE,DIALOG_STYLE_PASSWORD,string,dstring,"GO","END"); //HouseInfo[GetPVarInt(i, "RamHouseID")][hLocked]=0; //DeletePVar(i,"RamHouse"); //DeletePVar(i,"RamHouseID"); //StopProgress(i); } } else { DeletePVar(i,"RamHouse"); DeletePVar(i,"RamHouseID"); SendClientMessage(i,COLOR_LIGHTRED, "TOO FAR."); StopProgress(i); } }
if(dialogid == DIALOG_UNCODE) { new Float: x, Float: y, Float:z; new getPOS = GetPlayerPos(playerid, x, y, z); if(!response) { DeletePVar(playerid, "RamHouseID"); DeletePVar(playerid, "RamHouse"); DeletePVar(playerid, "UnCodeRound"); StopProgress(playerid); DeletePVar(playerid,"PassedCode"); DeletePVar(playerid,"FailedCode"); DeletePVar(playerid,"Uncoding"); return 1; } SetPVarInt(playerid,"UnCodeRound", GetPVarInt(playerid,"UnCodeRound")+1); if(strlen(inputtext) > 0 && strlen(inputtext) < 31 && strcmp(inputtext, PlayerInfo[playerid][pUncode]) == 0) { if(GetPVarInt(playerid,"UnCodeRound") == 5) { if(GetPVarInt(playerid,"FailedCode") > GetPVarInt(playerid,"PassedCode")) { DeletePVar(playerid, "RamHouseID"); DeletePVar(playerid, "RamHouse"); DeletePVar(playerid, "UnCodeRound"); StopProgress(playerid); DeletePVar(playerid,"PassedCode"); DeletePVar(playerid,"FailedCode"); DeletePVar(playerid,"Uncoding"); SetPVarInt(playerid, "PL_NotAllowed", 1); scm(playerid, COLOR_GREY, "FAILED!"); CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, getPOS, GetPlayerArea(playerid)); } else { GameTextForPlayer(playerid, "~w~HOUSE~g~UNLOCKED!", 5000, 0); HouseInfo[GetPVarInt(playerid, "RamHouseID")][hLocked]=0; //reset DeletePVar(playerid, "RamHouseID"); DeletePVar(playerid, "RamHouse"); DeletePVar(playerid, "UnCodeRound"); StopProgress(playerid); DeletePVar(playerid,"PassedCode"); DeletePVar(playerid,"FailedCode"); DeletePVar(playerid,"Uncoding"); SetPVarInt(playerid, "PL_NotAllowed", 1); ProgressBar(playerid, "UNCODING...", 25, 4); } } PicklockString(playerid); format(string,sizeof(string),"If you have not done when the time's end, you will be sent to next round.\nIf you have two losing streak, you will be failed and reported!\n\nPlease type the code (A-Z mixed with 0-9): %s",PlayerInfo[playerid][pUncode]); format(string,sizeof(string),"Uncoding... Source: %d:%d",GetPVarInt(playerid, "PassedCode"),GetPVarInt(playerid, "FailedCode")); ShowPlayerDialog(playerid,DIALOG_UNCODE,DIALOG_STYLE_PASSWORD,string,dstring,"Go","End"); SetPVarInt(playerid,"PassedCode", 0); SetPVarInt(playerid,"FailedCode", GetPVarInt(playerid,"FailedCode")+1); DisablePlayerCheckpoint(playerid); SetPVarInt(playerid,"Uncoding", 1); SetPVarInt(playerid, "DoubleLose", 0); return 1; } //Go next if(GetPVarInt(playerid,"DoubleLose") == 2) { DeletePVar(playerid, "RamHouseID"); DeletePVar(playerid, "RamHouse"); DeletePVar(playerid, "UnCodeRound"); StopProgress(playerid); DeletePVar(playerid,"PassedCode"); DeletePVar(playerid,"FailedCode"); DeletePVar(playerid,"Uncoding"); SetPVarInt(playerid, "PL_NotAllowed", 1); scm(playerid, COLOR_GREY, "You got two losing streaks, you will be reported by CCTV!"); CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, getPOS, GetPlayerArea(playerid)); return 1; } PicklockString(playerid); ProgressBar(playerid, "UNCODING...", 25, 4); format(string,sizeof(string),"If you have not done when the time's end, you will be sent to next round.\nIf you have two losing streak, you will be failed and reported!\n\nPlease type the code (A-Z mixed with 0-9): %s",PlayerInfo[playerid][pUncode]); format(string,sizeof(string),"Uncoding... Source: %d:%d",GetPVarInt(playerid, "PassedCode"),GetPVarInt(playerid, "FailedCode")); ShowPlayerDialog(playerid,DIALOG_UNCODE,DIALOG_STYLE_PASSWORD,string,dstring,"Go","End"); SetPVarInt(playerid,"PassedCode", 0); SetPVarInt(playerid,"FailedCode", GetPVarInt(playerid,"FailedCode")+1); DisablePlayerCheckpoint(playerid); SetPVarInt(playerid,"Uncoding", 1); SetPVarInt(playerid, "DoubleLose", GetPVarInt(playerid,"DoubleLose")+1); return 1; }
function SendHouseCrimeReport(hid, x, y, z, area[]) { new string[128]; if(x > 46.7115 && y > -2755.979 && x < 2931.147 && y < -548.8602) { SendFactionMessage(1, COLOR_BLUE, "HQ: All units - HQ: House Burglary."); format(string, sizeof(string), "Located at: %s", area); SendFactionMessage(1, COLOR_BLUE, string); printf("SendHouseCrimeReport Called! %d %f %f %f %s", hid, x, y, z, area); } return 1; }
Hello!
When the server crashes then you can use the plugin "crashdetect" to get more information. https://sampforum.blast.hk/showthread.php?tid=262796 |
[12:31:38] [debug] Server crashed while executing <unknown> [12:31:38] [debug] AMX backtrace: [12:31:38] [debug] #0 native CallRemoteFunction () from samp-server.exe [12:31:38] [debug] #1 0008a508 in public GPD_OnDialogResponse (7, 6729, 1, -1, 673727300) from <unknown> [12:31:38] [debug] #2 native CallLocalFunction () from samp-server.exe [12:31:38] [debug] #3 000128c0 in public OnDialogResponse (7, 6729, 1, -1, 673727176) from <unknown> [12:31:38] [debug] Native backtrace: [12:31:38] [debug] #0 0047431f in ?? () from samp-server.exe [12:31:38] [debug] #1 004010b6 in ?? () from samp-server.exe [12:31:38] [debug] #2 501062ca in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #3 50108b28 in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #4 501009c7 in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #5 5010631a in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #6 500451b9 in ?? () from plugins\streamer.DLL [12:31:38] [debug] #7 004746be in ?? () from samp-server.exe [12:31:38] [debug] #8 004010b6 in ?? () from samp-server.exe [12:31:38] [debug] #9 501062ca in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #10 50108b28 in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #11 501009c7 in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #12 5010631a in ?? () from plugins\crashdetect.DLL [12:31:38] [debug] #13 500451b9 in ?? () from plugins\streamer.DLL [12:31:38] [debug] #14 0046ec31 in ?? () from samp-server.exe [12:31:38] [debug] #15 00452270 in ?? () from samp-server.exe [12:31:38] [debug] #16 0049eef9 in ?? () from samp-server.exe [12:31:38] [debug] #17 004aa31e in ?? () from samp-server.exe
function SendHouseCrimeReport(hid, Float:x, Float:y, Float:z, area[]) { new string[128]; if(x > 46.7115 && y > -2755.979 && x < 2931.147 && y < -548.8602) { SendFactionMessage(1, COLOR_BLUE, "HQ: All units - HQ: House Burglary."); format(string, sizeof(string), "Located at: %s", area); SendFactionMessage(1, COLOR_BLUE, string); printf("SendHouseCrimeReport Called! %d %f %f %f %s", hid, x, y, z, area); } return 1; }
CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, getPOS, GetPlayerArea(playerid));
#if !defined isnull
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
#if !defined strcpy
#define strcpy(%0,%1) strcat((%0[0] = EOS, %0), %1)
#endif
new name_of_area[32]; // change to a size that fits your purposes
strcpy(name_of_area, GetPlayerArea(playerid));
CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, x, y, z, isnull(name_of_area) ? ("\1") : name_of_area);
if(dialogid == DIALOG_UNCODE)
{
new Float: x, Float: y, Float:z;
new getPOS = GetPlayerPos(playerid, x, y, z);
if(!response)
{
DeletePVar(playerid, "RamHouseID");
DeletePVar(playerid, "RamHouse");
DeletePVar(playerid, "UnCodeRound");
StopProgress(playerid);
DeletePVar(playerid,"PassedCode");
DeletePVar(playerid,"FailedCode");
DeletePVar(playerid,"Uncoding");
return 1;
}
SetPVarInt(playerid,"UnCodeRound", GetPVarInt(playerid,"UnCodeRound")+1);
if(strlen(inputtext) > 0 && strlen(inputtext) < 31 && strcmp(inputtext, PlayerInfo[playerid][pUncode]) == 0)
{
if(GetPVarInt(playerid,"UnCodeRound") == 5)
{
if(GetPVarInt(playerid,"FailedCode") > GetPVarInt(playerid,"PassedCode"))
{
DeletePVar(playerid, "RamHouseID");
DeletePVar(playerid, "RamHouse");
DeletePVar(playerid, "UnCodeRound");
StopProgress(playerid);
DeletePVar(playerid,"PassedCode");
DeletePVar(playerid,"FailedCode");
DeletePVar(playerid,"Uncoding");
SetPVarInt(playerid, "PL_NotAllowed", 1);
scm(playerid, COLOR_GREY, "FAILED!");
CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, x,y,z, GetPlayerArea(playerid));
}
else
{
GameTextForPlayer(playerid, "~w~HOUSE~g~UNLOCKED!", 5000, 0);
HouseInfo[GetPVarInt(playerid, "RamHouseID")][hLocked]=0;
//reset
DeletePVar(playerid, "RamHouseID");
DeletePVar(playerid, "RamHouse");
DeletePVar(playerid, "UnCodeRound");
StopProgress(playerid);
DeletePVar(playerid,"PassedCode");
DeletePVar(playerid,"FailedCode");
DeletePVar(playerid,"Uncoding");
SetPVarInt(playerid, "PL_NotAllowed", 1);
ProgressBar(playerid, "UNCODING...", 25, 4);
}
}
PicklockString(playerid);
format(string,sizeof(string),"If you have not done when the time's end, you will be sent to next round.\nIf you have two losing streak, you will be failed and reported!\n\nPlease type the code (A-Z mixed with 0-9): %s",PlayerInfo[playerid][pUncode]);
format(string,sizeof(string),"Uncoding... Source: %d:%d",GetPVarInt(playerid, "PassedCode"),GetPVarInt(playerid, "FailedCode"));
ShowPlayerDialog(playerid,DIALOG_UNCODE,DIALOG_STYLE_PASSWORD,string,dstring,"Go","End");
SetPVarInt(playerid,"PassedCode", 0);
SetPVarInt(playerid,"FailedCode", GetPVarInt(playerid,"FailedCode")+1);
DisablePlayerCheckpoint(playerid);
SetPVarInt(playerid,"Uncoding", 1);
SetPVarInt(playerid, "DoubleLose", 0);
return 1;
}
//Go next
if(GetPVarInt(playerid,"DoubleLose") == 2)
{
DeletePVar(playerid, "RamHouseID");
DeletePVar(playerid, "RamHouse");
DeletePVar(playerid, "UnCodeRound");
StopProgress(playerid);
DeletePVar(playerid,"PassedCode");
DeletePVar(playerid,"FailedCode");
DeletePVar(playerid,"Uncoding");
SetPVarInt(playerid, "PL_NotAllowed", 1);
scm(playerid, COLOR_GREY, "You got two losing streaks, you will be reported by CCTV!");
CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, x,y,z, GetPlayerArea(playerid));
return 1;
}
PicklockString(playerid);
ProgressBar(playerid, "UNCODING...", 25, 4);
format(string,sizeof(string),"If you have not done when the time's end, you will be sent to next round.\nIf you have two losing streak, you will be failed and reported!\n\nPlease type the code (A-Z mixed with 0-9): %s",PlayerInfo[playerid][pUncode]);
format(string,sizeof(string),"Uncoding... Source: %d:%d",GetPVarInt(playerid, "PassedCode"),GetPVarInt(playerid, "FailedCode"));
ShowPlayerDialog(playerid,DIALOG_UNCODE,DIALOG_STYLE_PASSWORD,string,dstring,"Go","End");
SetPVarInt(playerid,"PassedCode", 0);
SetPVarInt(playerid,"FailedCode", GetPVarInt(playerid,"FailedCode")+1);
DisablePlayerCheckpoint(playerid);
SetPVarInt(playerid,"Uncoding", 1);
SetPVarInt(playerid, "DoubleLose", GetPVarInt(playerid,"DoubleLose")+1);
return 1;
}
CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, x,y,z, GetPlayerArea(playerid));
PHP код:
PHP код:
![]() |