SA-MP Forums Archive
Stay within the world boundaries / loading - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stay within the world boundaries / loading (/showthread.php?tid=440815)



Stay within the world boundaries / loading - Flyfishes - 31.05.2013

Hey!

I've recently been experiencing the "Stay within the world boundaries / loading" bug and I can't find a fix. It only occurs when your player dies and here's a short list of what's happening;
  1. You play along fine in your regular skin
  2. Your player dies
  3. Your skin changes to CJ and the class-select buttons appear
  4. You press the spawn-button and you get the bug
First of all, in my script - once you die, you go straight to hospital, no class-selection thing in between.

How can I solve this idiotic bug? I don't know how it appeared. Once I upgraded my script to 0.3x it started fucking up. It has been working completely fine earlier.


Thank you!


Re: Stay within the world boundaries / loading - BossZk - 31.05.2013

is there somewhere where its forcing class selection to the player?


Re: Stay within the world boundaries / loading - zT KiNgKoNg - 31.05.2013

Place this in "OnGamemodeInt"

pawn Код:
AddPlayerClass(0, -1412.0469, -303.6844, 14.0414, 269.1425, 0, 0, 0, 0, 0, 0);



Re: Stay within the world boundaries / loading - Flyfishes - 31.05.2013

Like SpawnPlayer? Yeah..

Once logged in an the player has loaded all data from database;
pawn Код:
SetSpawnInfo(extraid, 0, playerVariables[extraid][pSkin], playerVariables[extraid][pPos][0], playerVariables[extraid][pPos][1], playerVariables[extraid][pPos][2], 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(extraid);
                       
SetPlayerVirtualWorld(extraid, playerVariables[extraid][pVirtualWorld]);
SetPlayerInterior(extraid, playerVariables[extraid][pInterior]);
.. and that's it.

Here's my OnPlayerDeath by the way;
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    for(new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, i))
        {
            RemovePlayerAttachedObject(playerid, i);
        }
    }
    SetPlayerSpecialActionEx(playerid, SPECIAL_ACTION_NONE);
    validResetPlayerWeapons(playerid);
    playerVariables[playerid][pPhoneCall] = -1;
                   
    if(playerVariables[playerid][pAdminDuty] == 1)
    {
        GetPlayerPos(playerid, playerVariables[playerid][pPos][0], playerVariables[playerid][pPos][1], playerVariables[playerid][pPos][2]);
    }
    else playerVariables[playerid][pHospital] = -1;
    return 1;
}

EDIT:
Quote:
Originally Posted by zT KiNgKoNg
Посмотреть сообщение
Place this in "OnGamemodeInt"

pawn Код:
AddPlayerClass(0, -1412.0469, -303.6844, 14.0414, 269.1425, 0, 0, 0, 0, 0, 0);
I've tried adding classes but that does not work at all!


Re: Stay within the world boundaries / loading - [SP]Badman - 31.05.2013

I have been experiencing this too. It may be caused because of lag, I'm not sure.

It may be caused because of lag, but the above solutions have not fixed it yet.


Re: Stay within the world boundaries / loading - Dopefull - 31.05.2013

I don't know if this can help in any way but I made a FS that creates " Stay within the worlds boundries " on any player you like, maybe you can reverse that for yourself? I don't know really

Peace