TogglePlayerSpectating, spawning then closing server connection. [REP++]
#3

No instances found. I just checked for that, it has something to do with TogglePlayerSpectating, I had a similar problem a while ago with SetSpawnInfo();

These are all the relevant things.

pawn Код:
public OnGameModeInit()
{

    AddPlayerClass(-snip-);

}
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    TogglePlayerSpectating(playerid,1);
....
    if(!fexist(File) )
    {
        ShowPlayerDialog(
        }
}
pawn Код:
 
pawn Код:
public OnPlayerSpawn(playerid)
{
    IsPlayerSpawned[playerid] = 1;
    HUDCreate(playerid);
    SpawnShit(playerid);
    return 1;
}
pawn Код:
if(dialogid == Register_Dialog)
    {
    if(response)
        {
        TogglePlayerSpectating(playerid,0);
        //SpawnPlayer(playerid);
        clearchat(playerid);

Now if I uncomment SpawnPlayer, they're not kicked but they spawn twice, doubling everything they get from SpawnShit(playerid);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)