- 0
Sign in to follow this
Followers
0
Ошибка с запуском сервера
Asked by
Azix
,
Question
Лучший ответ
@Azix
SetVehicleData(arendaveh[0], V_RENT, 59);
SetVehicleData(arendaveh[0], V_RENTP, 100000);
SetVehicleData(arendaveh[0], V_OWRENT, 0);
Замени на:
if(IsValidVehicle(arendaveh[0]))
{
SetVehicleData(arendaveh[0], V_RENT, 59);
SetVehicleData(arendaveh[0], V_RENTP, 100000);
SetVehicleData(arendaveh[0], V_OWRENT, 0);
}
This topic is now closed to further replies.
Sign in to follow this
Followers
0
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By Chopick
Всем здравствуйте! Делаю систему домов/бизнесов по туториалу knox know с плагином GoodArea. Есть проблема, если заходишь в интерьер бизнеса, то когда выходишь спавнит почему-то на пикап дома.
Вот енумы:
#define MAX_HOUSES 1000 #define MAX_BIZS 1000 enum house { hID, STREAMER_TAG_PICKUP:hPICKUP, STREAMER_TAG_AREA:hAREA, hOWNER[MAX_PLAYER_NAME], STREAMER_TAG_3D_TEXT_LABEL:hTEXT[256], STREAMER_TAG_MAP_ICON:hICON, hPRICE, hCLASS, hINTERIOR, Float:hX, Float:hY, Float:hZ, Float:hA, hCONDITION // Закрыт/Открыт } new House[MAX_HOUSES][house]; new Houses; new HouseGroup; enum biz { bID, STREAMER_TAG_PICKUP:bPICKUP, STREAMER_TAG_AREA:bAREA, bOWNER[MAX_PLAYER_NAME], STREAMER_TAG_3D_TEXT_LABEL:bTEXT[256], STREAMER_TAG_MAP_ICON:bICON, bNAME[25], bPRICE, bTYPE, bINTERIOR, Float:bX, Float:bY, Float:bZ, Float:bA } new Biz[MAX_BIZS][biz]; new Bizs; new BizGroup; enum interior_info { intID, intNAME[41], intINTERIOR, Float:intX, Float:intY, Float:intZ, Float:intA, STREAMER_TAG_AREA:intAREA } new Interior[MAX_INTERIORS][interior_info]; new Interiors; new InteriorGroup; Вот что у меня в OnGameModeInit:
HouseGroup = CreateGroupGoodAreas(GoodArea:HouseEnter); InteriorGroup = CreateGroupGoodAreas(GoodArea:InteriorExit); BizGroup = CreateGroupGoodAreas(GoodArea:BizArea);
Вот стоки:
GAResponse:HouseEnter(playerid, response, key, index) { switch(response) { case GA_RESPONSE_PRESS_KEY: { if(key & KEY_WALK) { if(House[index][hCONDITION] > 0 && House[index][hOWNER] == player_info[playerid][NAME] || House[index][hCONDITION] == 0) { GoToInterior(playerid, House[index][hINTERIOR]); SetPlayerVirtualWorld(playerid, index); } else if(House[index][hCONDITION] > 0 && House[index][hOWNER] != player_info[playerid][NAME]) return SCM(playerid, COLOR_RED, "[Ошибка]{ffffff}Этот дом закрыт на ключ!"); } } case GA_RESPONSE_ENTER: { if(House[index][hOWNER] == 0) { CreateNoOwnerHouseTD(playerid); for(new i = 0; i < sizeof NoOwnerTextDraw_PTD[]; i++) { PlayerTextDrawShow(playerid, NoOwnerTextDraw_PTD[playerid][i]); } new price[8]; format(price, sizeof(price), "%d$", House[index][hPRICE]); PlayerTextDrawSetString(playerid, NoOwnerTextDraw_PTD[playerid][2], price); new id[9]; format(id, sizeof(id), "%d", House[index][hID]); PlayerTextDrawSetString(playerid, NoOwnerTextDraw_PTD[playerid][0], id); switch(House[index][hCLASS]) { case 1: PlayerTextDrawSetString(playerid, NoOwnerTextDraw_PTD[playerid][1], "A"); case 2: PlayerTextDrawSetString(playerid, NoOwnerTextDraw_PTD[playerid][1], "B"); case 3: PlayerTextDrawSetString(playerid, NoOwnerTextDraw_PTD[playerid][1], "C"); } for(new i = 0; i < sizeof NoOwnerTextDraw_TD; i++) { TextDrawShowForPlayer(playerid, NoOwnerTextDraw_TD[i]); } } } case GA_RESPONSE_LEAVE: { for(new i = 0; i < sizeof NoOwnerTextDraw_PTD[]; i++) { PlayerTextDrawHide(playerid, NoOwnerTextDraw_PTD[playerid][i]); } for(new i = 0; i < sizeof NoOwnerTextDraw_TD; i++) { TextDrawHideForPlayer(playerid, NoOwnerTextDraw_TD[i]); } } } return 1; } GAResponse:BizArea(playerid, response, key, index) { switch(response) { case GA_RESPONSE_PRESS_KEY: { if(key & KEY_WALK) { GoToInteriorBiz(playerid, Biz[index][bINTERIOR]); SetPlayerVirtualWorld(playerid, index); } } } return 1; } GAResponse:InteriorExit(playerid, response, key, index) { switch(response) { case GA_RESPONSE_PRESS_KEY: { new world = GetPlayerVirtualWorld(playerid); if(key & KEY_WALK) { if(world < MAX_HOUSES) { SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid, House[world][hX], House[world][hY], House[world][hZ]); SetPlayerFacingAngle(playerid, House[world][hA]); } else if(world < MAX_HOUSES + MAX_BIZS) { world -= MAX_HOUSES; printf("%d index world", world); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid, Biz[world][bX], Biz[world][bY], Biz[world][bZ]); SetPlayerFacingAngle(playerid, Biz[world][bA]); } } if(key & KEY_CTRL_BACK) { if(player_info[playerid][HOUSE] != House[world][hID]) return SCM(playerid, COLOR_RED, "[Ошибка]{ffffff}Вы не владелец данного дома!"); new dialog[256]; format(dialog, sizeof(dialog), "{ffd900}[1]{ffffff}Информация о доме\n\ {ffd900}[2]{ffffff}%s дом", (House[world][hCONDITION] == 1) ? ("{00ff00}Открыть") : ("{ff0000}Закрыть")); SPD(playerid, DLG_HMENU, DIALOG_STYLE_LIST, "{ffd900}Меню дома", dialog, "Выбрать", "Закрыть"); return 1; } } } return 1; } stock GoToInterior(playerid, interior) { for(new i = 0; i < Interiors; i++) { if(Interior[i][intID] != interior) continue; SetPlayerInterior(playerid, Interior[i][intINTERIOR]); SetPlayerPos(playerid, Interior[i][intX], Interior[i][intY], Interior[i][intZ]); SetPlayerFacingAngle(playerid, Interior[i][intA]); SetPlayerCheckpoint(playerid, Interior[i][intX], Interior[i][intY], Interior[i][intZ], 1.0); new str[128]; format(str, sizeof(str), "Нажмите \"ALT\" для выхода\n\ Нажмите \"H\", чтобы открыть меню дома"); Create3DTextLabel(str, -1, Interior[i][intX], Interior[i][intY], Interior[i][intZ], 15.0, 0, 1); return 1; } return 0; } stock GoToInteriorBiz(playerid, interior) { for(new i = 0; i < Interiors; i++) { if(Interior[i][intID] != interior) continue; SetPlayerInterior(playerid, Interior[i][intINTERIOR]); SetPlayerPos(playerid, Interior[i][intX], Interior[i][intY], Interior[i][intZ]); SetPlayerFacingAngle(playerid, Interior[i][intA]); SetPlayerCheckpoint(playerid, Interior[i][intX], Interior[i][intY], Interior[i][intZ], 1.0); new str[128]; format(str, sizeof(str), "Нажмите \"ALT\" для выхода"); Create3DTextLabel(str, -1, Interior[i][intX], Interior[i][intY], Interior[i][intZ], 15.0, 0, 1); return 1; } return 0; }
Что мне делать, подскажите пожалуйста?
-
Posted (edited) · Report post
При запуске выдаёт это:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[16:14:00] filterscripts = "" (string)
[16:14:00]
[16:14:00] Server Plugins
[16:14:00] --------------
[16:14:00] Loading plugin: crashdetect
[16:14:00] CrashDetect plugin 4.19.4
[16:14:00] Loaded.
[16:14:00] Loading plugin: pawncmd
[16:14:00] Pawn.CMD plugin v3.2.0 by urShadow has been loaded
[16:14:00] Loaded.
[16:14:00] Loading plugin: pawnraknet
[16:14:00] [Pawn.RakNet] plugin v1.5.1 loading...
[16:14:00] [Pawn.RakNet]
| Pawn.RakNet 1.5.1 | 2016 - 2021
|--------------------------------
| Author and maintainer: katursis
| Compiled: Sep 26 2021 at 12:04:10
|--------------------------------------------------------------
| Repository: https://github.com/katursis/Pawn.RakNet
|--------------------------------------------------------------
| Wiki: https://github.com/katursis/Pawn.RakNet/wiki
[16:14:00] Loaded.
[16:14:00] Loading plugin: sscanf
[16:14:00]
[16:14:00] ===============================
[16:14:00] sscanf plugin loaded.
[16:14:00] Version: 2.8.3
[16:14:00] (c) 2018 Alex "Y_Less" Cole
[16:14:00] ===============================
[16:14:00] Loaded.
[16:14:00] Loading plugin: streamer
[16:14:00]
*** Streamer Plugin v2.9.4 by Incognito loaded ***
[16:14:00] Loaded.
[16:14:00] Loading plugin: mysql
[16:14:00] >> plugin.mysql: R39-6 successfully loaded.
[16:14:00] Loaded.
[16:14:00] Loading plugin: profiler
[16:14:00] Profiler plugin 2.15.1
[16:14:00] Loaded.
[16:14:00] Loading plugin: timerfix
[16:14:00] >> TimerFix v1.5 successfully loaded.
[16:14:00] Loaded.
[16:14:00] Loaded 8 plugins.
[16:14:00]
[16:14:00] Ban list
[16:14:00] --------
[16:14:00] Loaded: samp.ban
[16:14:00]
[16:14:00]
[16:14:00] Filterscripts
[16:14:00] ---------------
[16:14:00] Loaded 0 filterscripts.
[16:14:00]
[16:14:00] --------------------------------------
[16:14:00] Античит Nex-AC загружен!
[16:14:00] Версия античита: 1.9.53
[16:14:00] Автор: Nexius
[16:14:00] --------------------------------------
[16:14:00] [TextDraw]: Все текстдравы созданы
[16:14:00] [debug] Run time error 4: "Array index out of bounds"
[16:14:00] [debug] Attempted to read/write array element at index 65535 in array of size 9000
[16:14:00] [debug] AMX backtrace:
[16:14:00] [debug] #0 00ad1590 in CreateVehicles () at C:\Users\olegr\OneDrive\Рабочий стол\mod\gamemodes\smouk.pwn:33464
[16:14:00] [debug] #1 009ce43c in public PawnRakNet_OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\gamemodes\smouk.pwn:9034
[16:14:00] [debug] #2 0005bf48 in public n_veh_OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\pawno\include\Pawn.RakNet.inc:1153
[16:14:00] [debug] #3 0005b4c8 in public n_OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\pawno\include\system/vehicle.pwn:15026
[16:14:00] [debug] #4 0005a978 in public ac_OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\pawno\include\system/pickup.pwn:133
[16:14:00] [debug] #5 00015bdc in public PawnCmd_OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\pawno\include\nex-ac.inc:3408
[16:14:00] [debug] #6 00008410 in public SSCANF_OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\pawno\include\pawncmd.inc:125
[16:14:00] [debug] #7 00001760 in public fc_OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\pawno\include\sscanf2.inc:211
[16:14:00] [debug] #8 0000116c in public OnGameModeInit () at C:\Users\olegr\OneDrive\Рабочий стол\mod\pawno\include\foreach.inc:581
[16:14:00] ------------------------
[16:14:00] Smouk
[16:14:00] vk.com/smoukrussia
[16:14:00] ------------------------
[16:14:00] Number of vehicle models: 32
Лог бд
[16:14:00 01/24/22] [ERROR] mysql_query - invalid connection handle (id: 0)
[16:14:00 01/24/22] [WARNING] cache_get_row_count - no active cache
Бд подключл правильно,но не понимаю в чём проблема
Edited by Azix
Share this post
Link to post
Share on other sites