Эванс
Дебютант
Пишу мод с основы, была функция, где вышел там и спавн, я убрал эту систему и сделал просто спавн на вокзале, после этого стало крашить при спавне. Даже когда при регистрации идет выбор скина, когда игрок спавнится и его отправляет на выбор скина его крашит.
OnPlayerSpawn
Код краша
За помощь дам спасибку.
OnPlayerSpawn
PHP:
public OnPlayerSpawn(playerid)
{
new string[128];
if(!PlayerLogged[playerid]) return 1;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
StatusInfo[playerid][sSpawn] = 1;
PlayerTied[playerid] = false;
PlayerCuffed[playerid] = false;
StopAudioStreamForPlayer(playerid);
switch(PlayerInfo[playerid][pMember])
{
case REPORTER_ORG: SetPlayerColor(playerid, COLOR_PL_REPORTER), GivePlayerWeaponEx(playerid, 43, 99999);
case POLICE_ORG: SetPlayerColor(playerid, COLOR_PL_POLICE);
case MEDIC_ORG: SetPlayerColor(playerid, COLOR_PL_MEDIC);
case HITMAN_ORG: SetPlayerColor(playerid, COLOR_PL_HITMAN);
case ADVOKAT_ORG: SetPlayerColor(playerid, COLOR_PL_ADVOKAT);
case PATRUL_ORG: SetPlayerColor(playerid, COLOR_PL_PATRUL);
case TRANSPORT_ORG: SetPlayerColor(playerid, COLOR_PL_TRANSPORT);
case MERIA_ORG:
{
SetPlayerColor(playerid, COLOR_PL_MERIA);
if(PlayerInfo[playerid][pRank] == 1)
{
GivePlayerWeaponEx(playerid, 3);
GivePlayerWeaponEx(playerid, 24);
}
}
case GROOVE_GANG: SetPlayerColor(playerid, COLOR_PL_GROOVE);
case BALLAS_GANG: SetPlayerColor(playerid, COLOR_PL_BALLAS);
case VAGOS_GANG: SetPlayerColor(playerid, COLOR_PL_VAGOS);
case AZTECAS_GANG: SetPlayerColor(playerid, COLOR_PL_AZTECAS);
case RIFA_GANG: SetPlayerColor(playerid, COLOR_PL_RIFA);
case NOSTRA_MAFIA: SetPlayerColor(playerid, COLOR_PL_NOSTRA);
case YAKUZA_MAFIA: SetPlayerColor(playerid, COLOR_PL_YAKUZA);
case RUSSIAN_MAFIA: SetPlayerColor(playerid, COLOR_PL_RUSSIAN);
default: SetPlayerColor(playerid, COLOR_PL_WHITE);
}
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
if(!PlayerStarting[playerid])
{
LoadingPlayerAnimations(playerid);
GivePlayerSavedWeapons(playerid);
TextDrawShowForPlayer(playerid, TimeServer);
TextDrawShowForPlayer(playerid, Advertising);
if(PlayerInfo[playerid][pBandana] != 0) SetPlayerBandana(playerid, PlayerInfo[playerid][pBandana]);
if(PlayerInfo[playerid][pHat] != 0) SetPlayerHat(playerid, PlayerInfo[playerid][pHat]);
TogglePlayerControllable(playerid,true);
SetPlayerPos(playerid,2504.7473,-2126.8682,23.4558);
SetPlayerFacingAngle(playerid, 270.6417);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
StopAudioStreamForPlayer(playerid);
CurrentPlayerTime(playerid);
}
if(PlayerInfo[playerid][pJailTime] == 99999)
{
if(PlayerInfo[playerid][pLevel] < 12) SetPlayerHealthEx(playerid, 45+PlayerInfo[playerid][pLevel]*5);
else SetPlayerHealthEx(playerid, 100);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid, 2572.0044, -2410.8154, 22.3701);
SetPlayerFacingAngle(playerid, 90.0);
PlayerInfo[playerid][pJailTime] = 0;
return 1;
}
else if(PlayerInfo[playerid][pJailTime] == 9999)
{
PlayerInfo[playerid][pJailTime] = GetPlayerWantedLevel(playerid)*300;
SendClientMessage(playerid, COLOR_ORANGE, "Ты посажен в тюрьму за выход при аресте");
return 1;
}
else if(PlayerInfo[playerid][pJailTime] > 0)
{
JailTimer[playerid] = SetTimerEx("CountPlayerUnJail", 1000, true, "i", playerid);
SpawnPlayerInJail(playerid);
if(!DeathArrest[playerid]) SendClientMessage(playerid, COLOR_ORANGE, "Возвращайся в тюрьму");
DeathArrest[playerid] = false;
PlayerStarting[playerid] = true;
return 1;
}
if(!PlayerRegister[playerid])
{
if(!PlayerStarting[playerid])
{
PlayerStarting[playerid] = true;
//if(PlayerInfo[playerid][pSpawn] == 0) SetPlayerSavedPos(playerid);
if(PlayerInfo[playerid][pSpawn] == 1)
{
SetPlayerHealthEx(playerid, PlayerInfo[playerid][pHealth]);
new houseid;
if(PlayerInfo[playerid][pHouse] != 0) houseid = PlayerInfo[playerid][pHouse];
else houseid = PlayerInfo[playerid][pRent];
IsInPlayerHouse[playerid][houseid] = true;
GetPlayerHouse[playerid] = houseid;
SetPlayerHouseInterior(playerid, houseid);
PlayerInInterior[playerid] = true;
CurrentPlayerTime(playerid);
if(PlayerInfo[playerid][pHouse] != 0) SendClientMessage(playerid, COLOR_WHITE, "Чтобы посмотреть меню дома используй команду /homemenu");
if(HouseInfo[houseid][hHealth] == 1) SetPlayerHealthEx(playerid, 100);
}
if(PlayerInfo[playerid][pSpawn] == 2)
{
SetPlayerHealthEx(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerOrganizationSpawn(playerid);
}
}
else
{
if(!PlayerSavedPositions[playerid])
{
if(PlayerInfo[playerid][pSpawn] == 0)
{
if(PlayerInfo[playerid][pLevel] < 12) SetPlayerHealthEx(playerid, 45+PlayerInfo[playerid][pLevel]*5);
else SetPlayerHealthEx(playerid, 100);
SetPlayerPos(playerid, 2113.6587, -2388.2190, 21.9430);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerVirtualWorld(playerid,0);
if(GetPlayerMoneyEx(playerid) >= GetMedPrice)
{
f(string, "За лечения доктор взял с тебя {9DDAF2}%d$", GetMedPrice);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerMoneyEx(playerid, -GetMedPrice);
}
else
{
f(string, "За лечения доктор взял с тебя {9DDAF2}%d$", GetPlayerMoneyEx(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
ResetPlayerMoneyEx(playerid);
}
}
if(PlayerInfo[playerid][pSpawn] == 1)
{
if(PlayerInfo[playerid][pLevel] < 12) SetPlayerHealthEx(playerid, 45+PlayerInfo[playerid][pLevel]*5);
else SetPlayerHealthEx(playerid, 100);
new houseid;
if(PlayerInfo[playerid][pHouse] != 0) houseid = PlayerInfo[playerid][pHouse];
else houseid = PlayerInfo[playerid][pRent];
IsInPlayerHouse[playerid][houseid] = true;
GetPlayerHouse[playerid] = houseid;
SetPlayerHouseInterior(playerid, houseid);
PlayerInInterior[playerid] = true;
CurrentPlayerTime(playerid);
if(PlayerInfo[playerid][pHouse] != 0) SendClientMessage(playerid, COLOR_WHITE, "Чтобы посмотреть меню дома используй команду /homemenu");
if(HouseInfo[houseid][hHealth] == 1) SetPlayerHealthEx(playerid, 100);
}
if(PlayerInfo[playerid][pSpawn] == 2)
{
if(PlayerInfo[playerid][pLevel] < 12) SetPlayerHealthEx(playerid, 45+PlayerInfo[playerid][pLevel]*5);
else SetPlayerHealthEx(playerid, 100);
SetPlayerOrganizationSpawn(playerid);
}
}
else
{
PlayerSavedPositions[playerid] = false;
}
}
}
else
{
PlayerStarting[playerid] = true;
SetPlayerPos(playerid, 2508.9246,-2127.0493,23.4558);
SendClientMessage(playerid, COLOR_GREEN, "Вы успешно зарегались.");
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerHealthEx(playerid, 100);
PlayerRegister[playerid] = false;
}
SetCameraBehindPlayer(playerid);
return 1;
}
Код краша
PHP:
Exception At Address: 0x007324B6
Registers:
EAX: 0xC1000000 EBX: 0x0000002E ECX: 0x04C73208 EDX: 0x0000005B
ESI: 0x00000007 EDI: 0x22D4D7A0 EBP: 0x32AFDC0C ESP: 0x0028FCA8
EFLAGS: 0x00010283
Stack:
+0000: 0x03ABB028 0x03ABB028 0x0000005B 0x00000000
+0010: 0xFFFFFFFF 0x00FFFFFF 0x00000018 0x00000000
+0020: 0x00000001 0x0000000B 0x00000001 0x00000001
+0030: 0x00000004 0x00000001 0x00000001 0x00000001
+0040: 0x00000001 0x0F544B78 0x09679F60 0x002F5A80
+0050: 0x00000001 0x00757877 0x09679F60 0x00000000
+0060: 0x00000000 0x0000002E 0x00000000 0x04C600BC
+0070: 0x76436C30 0x00000000 0x3E248800 0x3F8CCCCD
+0080: 0x3F666666 0x00805769 0x0000005B 0x00000000
+0090: 0x42B65244 0x29D199C8 0x007491E4 0x04C600BC
+00A0: 0x0AD4E7AC 0x76436C30 0x00732639 0x32AFDC0C
+00B0: 0x0000005B 0x043C7100 0x00732BDC 0x03ABB028
+00C0: 0x32AFDC0C 0x0000005B 0x76436C30 0x0000001A
+00D0: 0x04C84FB8 0x00733F2A 0x043C7100 0x437CD9A3
+00E0: 0x00000001 0x0053E01E 0x00000000 0x0053EAA6
+00F0: 0x04C5612C 0x0053EAC4 0x44000000 0x43C00000
+0100: 0x0053ECC2 0x00000001 0x00619B71 0x0000001A
+0110: 0x00000001 0x00000001 0x0000000A 0x00748DA0
+0120: 0x0000001A 0x00000001 0x76281245 0x00000000
+0130: 0x0028FF88 0x7EFDE000 0x012F0000 0x4F70BA38
+0140: 0x002F10F0 0x00000008 0x00000100 0x00000008
+0150: 0x000001FE 0x44000000 0x43C00000 0x00000000
+0160: 0x00000000 0x00000400 0x00000300 0x00000000
+0170: 0x00000001 0x001E0280 0x00000113 0x00000001
+0180: 0x00000000 0x0014445F 0x00000200 0x00000180
+0190: 0x0000002C 0x00400000 0x04019F18 0x76281245
+01A0: 0x00000000 0x0028FF88 0x63BF4437 0x00400000
+01B0: 0x008246EB 0x76281245 0x00000000 0x008246F1
+01C0: 0x00400000 0x00000000 0x017A2DE2 0x0000000A
+01D0: 0x00000094 0x00000006 0x00000001 0x00001DB1
+01E0: 0x00000002 0x76726553 0x20656369 0x6B636150
+01F0: 0x00003120 0x00000000 0x00000000 0x00000000
+0200: 0x00000000 0x00000000 0x00000000 0x00000000
+0210: 0x00000000 0x00000000 0x00000000 0x00000000
+0220: 0x00000000 0x00000000 0x00000000 0x00000000
+0230: 0x00000000 0x00000000 0x00000000 0x00000000
+0240: 0x00000000 0x00000000 0x00000000 0x00000000
+0250: 0x00000000 0x00000000 0x00000000 0x00000000
+0260: 0x00824588 0x00000000 0x00000000 0x7EFDE000
+0270: 0xC0000005 0x00000000 0x017A2DE2 0x00000044
SCM Op: 0x248, lDbg: 0
Game Version: US 1.0
State Information: Ped Context: 0
P0 (0,0)
За помощь дам спасибку.
Последнее редактирование:
