- 0
Войдите для возможности подписаться
Подписчики
0
[закрыто] Ошибка public OnDialogResponse, public OnIncomingPacket
-
Последние посетители 0 пользователей онлайн
Ни одного зарегистрированного пользователя не просматривает данную страницу
-
Похожий контент
-
От grizly57a
вот логи
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, (C)2005-2015 SA-MP Team [16:41:25] [16:41:25] Server Plugins [16:41:25] -------------- [16:41:25] Loading plugin: crashdetect.so [16:41:25] CrashDetect plugin 4.19.4 [16:41:25] Loaded. [16:41:25] Loading plugin: pawncmd.so [16:41:25] Pawn.CMD plugin v3.2.0 by urShadow has been loaded [16:41:25] Loaded. [16:41:25] Loading plugin: pawnraknet.so [16:41:25] [Pawn.RakNet] plugin v1.6.0 loading... [16:41:25] [Pawn.RakNet] | Pawn.RakNet 1.6.0 | 2016 - 2023 |-------------------------------- | Author and maintainer: katursis | Compiled: Feb 12 2023 at 19:35:06 |-------------------------------------------------------------- | Repository: https://github.com/katursis/Pawn.RakNet |-------------------------------------------------------------- | Wiki: https://github.com/katursis/Pawn.RakNet/wiki [16:41:25] Loaded. [16:41:25] Loading plugin: sscanf.so [16:41:25] [16:41:25] =============================== [16:41:25] sscanf plugin loaded. [16:41:25] Version: 2.8.3 [16:41:25] (c) 2018 Alex "Y_Less" Cole [16:41:25] =============================== [16:41:25] Loaded. [16:41:25] Loading plugin: streamer.so [16:41:25] *** Streamer Plugin v2.9.4 by Incognito loaded *** [16:41:25] Loaded. [16:41:25] Loading plugin: mysql_static.so [16:41:25] >> plugin.mysql: R39-6 successfully loaded. [16:41:25] Loaded. [16:41:25] Loading plugin: TOTP.so [16:41:25] TOTP plugin v1.0.1 by Games loaded. [16:41:25] Loaded. [16:41:25] Loading plugin: profiler.so [16:41:25] Profiler plugin 2.15.1 [16:41:25] Loaded. [16:41:25] Loading plugin: timerfix.so [16:41:25] >> TimerFix v1.5 successfully loaded. [16:41:25] Loaded. [16:41:25] Loading plugin: UTuning.so [16:41:25] Loaded. [16:41:25] Loading plugin: housecar.so [16:41:25] Loaded. [16:41:25] Loading plugin: TOTP.so [16:41:25] TOTP plugin v1.0.1 by Games loaded. [16:41:25] Loaded. [16:41:25] Loading plugin: FCNPC.so [16:41:25] [16:41:25] ------------------------------------------------- [16:41:25] FCNPC - Fully Controllable NPC v2.0.9 [16:41:25] GNU/Linux SA-MP 0.3.7 R2 [16:41:25] Apr 17 2024 at 09:11:36 [16:41:25] [16:41:25] Author: OrMisicL (2013 - 2015) [16:41:25] Continued by: ziggi (2016 - present) [16:41:25] [16:41:25] See full credits in the README.md file [16:41:25] ------------------------------------------------- [16:41:25] [16:41:25] Loading... [16:41:25] [16:41:25] ------------------------------------------------- [16:41:25] ColAndreasv1.4.0 [16:41:25] [16:41:25] Created By: [16:41:25] [uL]Chris42O [16:41:25] [uL]Slice [16:41:25] [uL]Pottus [16:41:25] ------------------------------------------------- [16:41:25] [16:41:25] Loading... [16:41:25] ColAndreas v1.4.0 Loaded. [16:41:25] Loaded. [16:41:25] Loaded 13 plugins. [16:41:25] [16:41:25] Filterscripts [16:41:25] --------------- [16:41:25] Loading filterscript 'voice.amx'... [16:41:25] No collision data found. [16:41:25] [FCNPC] Warning: Unable to create NPCs. The maxnpc limit in server.cfg is 0. [16:41:25] -------------------------------------- [16:41:25] VOICE COPY RADMIR BY ������ dev. [16:41:25] -------------------------------------- [16:41:25] Loaded 1 filterscripts. [16:41:25] *** Streamer Plugin: Include file version (0x295) does not match plugin version (0x294) (script might need to be recompiled with the correct include file). [16:41:25] ------------------------------------------ [16:41:25] SSSS [16:41:25] ------------------------------------------ [16:41:25] mapname = "San Andreas" (string) [16:41:25] [Vehicle]: ��� ������������ �������� ������� [16:41:25] [TP]: ��� �����/������ ������� [16:41:25] [ATM]: ��� ��������� ������� [16:41:25] ����������� � ���� ������ �� ������� [������� � ����� ������ ����������] [16:41:25] ----------------------------------------- [16:41:25] [16:41:25] [16:41:25] [16:41:25] ----------------------------------------- [16:41:25] Number of vehicle models: 55 [16:42:00] [connection] 93.159.241.195:2395 requests connection cookie. [16:42:01] [connection] incoming connection: 93.159.241.195:2395 id: 0 [16:42:02] [join] Dkak_wlaas has joined the server (0:93.159.241.195) [16:42:02] [part] Dkak_wlaas has left the server (0:2)
-
Mironchik Новичок 0
Пишу команду (меню доната - коинов) и крашит сервер
[10:12:25] [debug] Server crashed while executing new.amx
[10:12:25] [debug] AMX backtrace:
[10:12:25] [debug] #0 00000014 in public OnDialogResponse (playerid=0, dialogid=271, response=1, listitem=2, inputtext[]=@017b5b8c "3. ") at C:\Users\fanti\OneDrive\Desktop\Мод 6.1\gamemodes\new.pwn:13
[10:12:25] [debug] #1 00bcb0c8 in public OnIncomingPacket () at C:\Users\fanti\OneDrive\Desktop\Мод 6.1\gamemodes\new.pwn:57310
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(strcmp(inputtext, "#", true) == 0 || strcmp(inputtext, "|", true) == 0 || strcmp(inputtext, "%", true) == 0 || strcmp(inputtext, "@", true) == 0 || strcmp(inputtext, "&", true) == 0)
{
SCM(playerid, -1, ".");
}
if(strfind(inputtext,"%") != -1)
{
return SendClientMessage(playerid, 0xFF6600FF, "В сообщение присутствуют запрещеные символы");
}
switch(dialogid)
{
case DIALOG_OWNABLE_TRAILER:
{
if(response)
{
new vehicleid = GetPlayerOwnableTrailerListitem(playerid);
new index = GetVehicleData(vehicleid, V_ACTION_ID);
if(vehicleid != INVALID_VEHICLE_ID)
{
switch(listitem + 1)
{
case 1: // Открыть / закрыть
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, 0xCECECEFF, "Вы должны находиться в транспорте");
if(GetPlayerOwnableCars(playerid) == 0)
return SendClientMessage(playerid, 0xCECECEFF, "Вы должны находиться в личном транспорте");
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
new Float:vX,Float:vY,Float:vZ;
GetVehiclePos(vehicleid,vX,vY,vZ);
if ((floatabs(pX-vX)<12.0)&&(floatabs(pY-vY)<12.0)&&(floatabs(pZ-vZ)<12.0)&& (vehicleid!=GetPlayerVehicleID(playerid)))
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
GetVehiclePos(vehicleid, GetOwnableTrailerData(index, OT_POS_X), GetOwnableTrailerData(index, OT_POS_Y), GetOwnableTrailerData(index, OT_POS_Z));
GetVehicleZAngle(vehicleid, GetOwnableTrailerData(index, OT_ANGLE));
SaveOwnableTrailer(vehicleid);
}
else
{
AttachTrailerToVehicle(vehicleid,GetPlayerVehicleID(playerid));
}
}
else SendClientMessage(playerid, 0x999999FF, "Вы должны находится возле дома на колёсах");
SetPVarInt(playerid, "go_list", 1);
//callcmd::lock(playerid, "1");
}
case 2: // Вставить / вытащить ключи
{
SetPVarInt(playerid, "go_list", 1);
if(vehicleid != INVALID_VEHICLE_ID)
{
new price = 5000;
if(GetPlayerGPSInfo(playerid, G_ENABLED) == GPS_STATUS_OFF)
{
if(GetPlayerMoneyEx(playerid) >= price)
{
GivePlayerMoneyEx(playerid, -price, "Метка ТС на GPS", true, true);
new Float: x, Float: y, Float: z;
GetVehiclePos(vehicleid, x, y, z);
EnablePlayerGPS(playerid, 55, x, y, z, "Местоположение Вашего транспорта отмечено на GPS");
return 1;
}
else SendClientMessage(playerid, 0x999999FF, "Недостаточно денег");
}
else SendClientMessage(playerid, 0xCECECEFF, "На Вашем GPS уже отмечено место");
}
}
case 3: // Отметить транспорт на GPS
{
SetPVarInt(playerid, "go_list", 1);
if(DestroyOwnableTrailer(vehicleid))
{
new fmt_str[128];
new car_price = 1400000;
new percent = car_price * 20 / 100;
new price = car_price - percent;
SetPlayerTrailerData(playerid, GetPVarInt(playerid, "listitem_trailer"), INVALID_VEHICLE_ID);
AddPlayerData(playerid, P_BANK, +, price);
BankLog(playerid, price, "Продажа личного транспорта");
format(fmt_str, sizeof fmt_str, "UPDATE accounts SET bank=%d WHERE id=%d LIMIT 1", GetPlayerBankMoney(playerid), GetPlayerAccountID(playerid));
mysql_query(mysql, fmt_str, false);
SendClientMessage(playerid, 0x3399FFFF, "Вы продали личный дом на колёсах");
format(fmt_str, sizeof fmt_str, "Налоговый сбор составляет 30 процентов от его стоимости {FF9900}(%d руб)", percent);
SendClientMessage(playerid, 0xFFFFFFFF, fmt_str);
format(fmt_str, sizeof fmt_str, "На основной банковский счет переведено {FFFF00}%d руб", price);
SendClientMessage(playerid, 0x66CC00FF, fmt_str);
format(fmt_str, sizeof fmt_str, "~g~+%d rub", price);
GameText(playerid, fmt_str, 4000, 2);
}
}
case 4: // Содержимое багажника
{
SetVehiclePos(vehicleid, GetOwnableTrailerData(index,OT_POS_X), GetOwnableTrailerData(index,OT_POS_Y), GetOwnableTrailerData(index,OT_POS_Z));
SetVehicleZAngle(vehicleid, GetOwnableTrailerData(index, OT_ANGLE));
}
case 5: // Выгрузить транспорт
{
if(UnloadPlayerOwnableTrailer(playerid, GetPVarInt(playerid, "listitem_trailer")))
SendClientMessage(playerid, 0x66CC33FF, "Ваш трейлер успешно выгружен!");
else
SendClientMessage(playerid, 0x999999FF, "С момента загрузки данного трейлера еще не прошло 1 минуты");
}
default:
return 1;
}
//callcmd::car(playerid, "");
}
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(strcmp(inputtext, "#", true) == 0 || strcmp(inputtext, "|", true) == 0 || strcmp(inputtext, "%", true) == 0 || strcmp(inputtext, "@", true) == 0 || strcmp(inputtext, "&", true) == 0)
{
SCM(playerid, -1, ".");
}
if(strfind(inputtext,"%") != -1)
{
return SendClientMessage(playerid, 0xFF6600FF, "В сообщение присутствуют запрещеные символы");
}
switch(dialogid)
{
case DIALOG_OWNABLE_TRAILER:
{
if(response)
{
new vehicleid = GetPlayerOwnableTrailerListitem(playerid);
new index = GetVehicleData(vehicleid, V_ACTION_ID);
if(vehicleid != INVALID_VEHICLE_ID)
{
switch(listitem + 1)
{
case 1: // Открыть / закрыть
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, 0xCECECEFF, "Вы должны находиться в транспорте");
if(GetPlayerOwnableCars(playerid) == 0)
return SendClientMessage(playerid, 0xCECECEFF, "Вы должны находиться в личном транспорте");
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
new Float:vX,Float:vY,Float:vZ;
GetVehiclePos(vehicleid,vX,vY,vZ);
if ((floatabs(pX-vX)<12.0)&&(floatabs(pY-vY)<12.0)&&(floatabs(pZ-vZ)<12.0)&& (vehicleid!=GetPlayerVehicleID(playerid)))
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
GetVehiclePos(vehicleid, GetOwnableTrailerData(index, OT_POS_X), GetOwnableTrailerData(index, OT_POS_Y), GetOwnableTrailerData(index, OT_POS_Z));
GetVehicleZAngle(vehicleid, GetOwnableTrailerData(index, OT_ANGLE));
SaveOwnableTrailer(vehicleid);
}
else
{
AttachTrailerToVehicle(vehicleid,GetPlayerVehicleID(playerid));
}
}
else SendClientMessage(playerid, 0x999999FF, "Вы должны находится возле дома на колёсах");
SetPVarInt(playerid, "go_list", 1);
//callcmd::lock(playerid, "1");
}
case 2: // Вставить / вытащить ключи
{
SetPVarInt(playerid, "go_list", 1);
if(vehicleid != INVALID_VEHICLE_ID)
{
new price = 5000;
if(GetPlayerGPSInfo(playerid, G_ENABLED) == GPS_STATUS_OFF)
{
if(GetPlayerMoneyEx(playerid) >= price)
{
GivePlayerMoneyEx(playerid, -price, "Метка ТС на GPS", true, true);
new Float: x, Float: y, Float: z;
GetVehiclePos(vehicleid, x, y, z);
EnablePlayerGPS(playerid, 55, x, y, z, "Местоположение Вашего транспорта отмечено на GPS");
return 1;
}
else SendClientMessage(playerid, 0x999999FF, "Недостаточно денег");
}
else SendClientMessage(playerid, 0xCECECEFF, "На Вашем GPS уже отмечено место");
}
}
case 3: // Отметить транспорт на GPS
{
SetPVarInt(playerid, "go_list", 1);
if(DestroyOwnableTrailer(vehicleid))
{
new fmt_str[128];
new car_price = 1400000;
new percent = car_price * 20 / 100;
new price = car_price - percent;
SetPlayerTrailerData(playerid, GetPVarInt(playerid, "listitem_trailer"), INVALID_VEHICLE_ID);
AddPlayerData(playerid, P_BANK, +, price);
BankLog(playerid, price, "Продажа личного транспорта");
format(fmt_str, sizeof fmt_str, "UPDATE accounts SET bank=%d WHERE id=%d LIMIT 1", GetPlayerBankMoney(playerid), GetPlayerAccountID(playerid));
mysql_query(mysql, fmt_str, false);
SendClientMessage(playerid, 0x3399FFFF, "Вы продали личный дом на колёсах");
format(fmt_str, sizeof fmt_str, "Налоговый сбор составляет 30 процентов от его стоимости {FF9900}(%d руб)", percent);
SendClientMessage(playerid, 0xFFFFFFFF, fmt_str);
format(fmt_str, sizeof fmt_str, "На основной банковский счет переведено {FFFF00}%d руб", price);
SendClientMessage(playerid, 0x66CC00FF, fmt_str);
format(fmt_str, sizeof fmt_str, "~g~+%d rub", price);
GameText(playerid, fmt_str, 4000, 2);
}
}
case 4: // Содержимое багажника
{
SetVehiclePos(vehicleid, GetOwnableTrailerData(index,OT_POS_X), GetOwnableTrailerData(index,OT_POS_Y), GetOwnableTrailerData(index,OT_POS_Z));
SetVehicleZAngle(vehicleid, GetOwnableTrailerData(index, OT_ANGLE));
}
case 5: // Выгрузить транспорт
{
if(UnloadPlayerOwnableTrailer(playerid, GetPVarInt(playerid, "listitem_trailer")))
SendClientMessage(playerid, 0x66CC33FF, "Ваш трейлер успешно выгружен!");
else
SendClientMessage(playerid, 0x999999FF, "С момента загрузки данного трейлера еще не прошло 1 минуты");
}
default:
return 1;
}
//callcmd::car(playerid, "");
}
}
}
Поделиться сообщением
Ссылка на сообщение
Поделиться на другие сайты