Hey, i have a little problem.. Yesterday i started making a new gamemode, started from 0. I made a few things like hub, dm arena, tdm arena, freeroam arena. But only dm arena is enabled. So when i log on, it shows me the hub perfectly, but as soon as i click on it, it's supposed to spawn me. Here's what i get:
https://i.imgur.com/55hUujl.png
It shows me the spawn dialog and when i click shift the player just gets stuck and the game crashes.
Here's the code to OnPlayerSpawn:
Here's the code for onplayerrequestclass:
Also here's the code to OnPlayerClickTextDraw
If anyone can help me i would appreciate it, i'm stuck with this...
https://i.imgur.com/55hUujl.png
It shows me the spawn dialog and when i click shift the player just gets stuck and the game crashes.
Here's the code to OnPlayerSpawn:
PHP Code:
public OnPlayerSpawn(playerid)
{
GameTextForPlayer(playerid, "~w~ENGLISH IN MAINCHAT, USE ~b~/CHAT ~w~FOR OTHER LANGUAGES!~n~~w~IF YOU DO NOT FOLLOW THE RULES YOU WILL BE ~r~BANNED", 10000, 3);
ResetPlayerWeapons(playerid);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 18);
SetPlayerVirtualWorld(playerid, 123469);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerPos(playerid, 1729.2920 ,-1669.4794 ,22.6151);
SetPlayerFacingAngle(playerid, 42.4700);
SpawnPlayer(playerid);
CancelSelectTextDraw(playerid);
HubHide(playerid);
TogglePlayerSpectating(playerid, 0);
SpawnPlayer(playerid);
ShowVersion(playerid);
return 1;
}
PHP Code:
public OnPlayerRequestClass(playerid, classid)
{
ResetPlayerWeapons(playerid);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 18);
SetPlayerVirtualWorld(playerid, 123469);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerPos(playerid, 1729.2920 ,-1669.4794 ,22.6151);
SetPlayerFacingAngle(playerid, 42.4700);
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_ORANGE, "Arena Deathmatch: {FFFFFF}/dm /lobby");
ShowStats(playerid);
HubHide(playerid);
TogglePlayerSpectating(playerid, 0);
SpawnPlayer(playerid);
return 1;
}
Also here's the code to OnPlayerClickTextDraw
PHP Code:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == tdmarea)
{
SendClientMessage(playerid, COLOR_WHITE, "Disabled.");
HubShow(playerid);
}
else if(clickedid == dmarea)
{
ResetPlayerWeapons(playerid);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 18);
SetPlayerVirtualWorld(playerid, 123469);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerPos(playerid, 1729.2920 ,-1669.4794 ,22.6151);
SetPlayerFacingAngle(playerid, 42.4700);
SpawnPlayer(playerid);
CancelSelectTextDraw(playerid);
HubHide(playerid);
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid, 0);
}
else if(clickedid == freeroamarea)
{
SendClientMessage(playerid, COLOR_WHITE, "Disabled.");
}
return 1;
}