12.05.2013, 01:53
So yeah, I TogglePlayerSpectating() when OnPlayerRequestClass is called, and I call it again to toggle it off after a dialog, it spawns them fine but the server closes connection instantly, ideas?
public OnGameModeInit()
{
AddPlayerClass(-snip-);
}
public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid,1);
....
if(!fexist(File) )
{
ShowPlayerDialog(
}
}
public OnPlayerSpawn(playerid)
{
IsPlayerSpawned[playerid] = 1;
HUDCreate(playerid);
SpawnShit(playerid);
return 1;
}
if(dialogid == Register_Dialog)
{
if(response)
{
TogglePlayerSpectating(playerid,0);
//SpawnPlayer(playerid);
clearchat(playerid);
SetSpawnInfo(playerid,1,90,0,0,0,0,0,0,0,0,0,0);