SA-MP Forums Archive
CJ Skin Bug Error (Pulling my hair out -_-) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: CJ Skin Bug Error (Pulling my hair out -_-) (/showthread.php?tid=377897)



CJ Skin Bug Error (Pulling my hair out -_-) - James.Clement - 15.09.2012

So, our server is having a CJ skin bug error, we have a CLEAN install of Vortex 2 script by Calgon, but sometimes players will randomly spawn with the CJ skin, even if they have chose another skin, sometimes if they relog they will fall in the sky to a certain death, it takes multiple relogs before they go back to normal and even that doesnt always work, i contacted volt host support and they said it has nothing to do with MySQL, and the only thing we did to the Vortex script was change the names of a few things like cities, commands and teleport locations, and i know those couldnt possibly have started this bug, can anyone help me out here, i feel like i wanna pull all the hair out of my head, we are VERY Stressed out over this and need help...


Re: CJ Skin Bug Error (Pulling my hair out -_-) - Emmet_ - 15.09.2012

Post your OnPlayerSpawn code, it could have a lot of problems.

(btw hi james)


Re: CJ Skin Bug Error (Pulling my hair out -_-) - Dodo9655 - 15.09.2012

There's no reason to post the OnPlayerSpawn code, as it hasn't been modified, it's the original Vortex one, but here it goes...
pawn Код:
public OnPlayerSpawn(playerid) {
    #if defined DEBUG
        printf("[debug] OnPlayerSpawn(%d)", playerid);
    #endif
   
    PreloadAnimLib(playerid,"BOMBER");
    PreloadAnimLib(playerid,"RAPPING");
    PreloadAnimLib(playerid,"SHOP");
    PreloadAnimLib(playerid,"BEACH");
    PreloadAnimLib(playerid,"SMOKING");
    PreloadAnimLib(playerid,"ON_LOOKERS");
    PreloadAnimLib(playerid,"DEALER");
    PreloadAnimLib(playerid,"CRACK");
    PreloadAnimLib(playerid,"CARRY");
    PreloadAnimLib(playerid,"COP_AMBIENT");
    PreloadAnimLib(playerid,"PARK");
    PreloadAnimLib(playerid,"INT_HOUSE");
    PreloadAnimLib(playerid,"FOOD");
    PreloadAnimLib(playerid,"GANGS");
    PreloadAnimLib(playerid,"PED");
    PreloadAnimLib(playerid,"FAT");

    SetPlayerColor(playerid, COLOR_WHITE);
    SetPlayerFightingStyle(playerid, playerVariables[playerid][pFightStyle]);

    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 998);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 998); // Skilled, but not dual-wield.

    if(playerVariables[playerid][pPrisonTime] >= 1) {
        switch(playerVariables[playerid][pPrisonID]) {
            case 1: {
                SetPlayerPos(playerid, -26.8721, 2320.9290, 24.3034);
                SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
            }
            case 2: {
                SetPlayerPos(playerid, 264.58, 77.38, 1001.04);
                SetPlayerInterior(playerid, 6);
                SetPlayerVirtualWorld(playerid, 0);
            }
            case 3: {

                SetPlayerInterior(playerid, 10);
                SetPlayerVirtualWorld(playerid, GROUP_VIRTUAL_WORLD+1);

                new spawn = random(sizeof(JailSpawns));

                SetPlayerPos(playerid, JailSpawns[spawn][0], JailSpawns[spawn][1], JailSpawns[spawn][2]);
                SetPlayerFacingAngle(playerid, 0);
            }
        }
        return 1;
    }

    if(playerVariables[playerid][pTutorial] == 1) {
        SetPlayerInterior(playerid, 14);
        SetPlayerPos(playerid, 216.9770, -155.4791, 1000.5234);
        SetPlayerFacingAngle(playerid, 267.9681);
        TogglePlayerControllable(playerid, false);
        return 1;
    }

    if(playerVariables[playerid][pHospitalized] >= 1)
        return initiateHospital(playerid);

    SetPlayerSkin(playerid, playerVariables[playerid][pSkin]);
    SetPlayerPos(playerid, playerVariables[playerid][pPos][0], playerVariables[playerid][pPos][1], playerVariables[playerid][pPos][2]);
    SetPlayerInterior(playerid, playerVariables[playerid][pInterior]);
    SetPlayerVirtualWorld(playerid, playerVariables[playerid][pVirtualWorld]);
    SetCameraBehindPlayer(playerid);

    playerVariables[playerid][pSkinSet] = 1;

    ResetPlayerWeapons(playerid);
    givePlayerWeapons(playerid);

    if(playerVariables[playerid][pEvent] >= 1)
        playerVariables[playerid][pEvent] = 0;

    if(playerVariables[playerid][pAdminDuty] == 1) {
        SetPlayerHealth(playerid, 500000.0);
    }
    else {
        SetPlayerHealth(playerid, playerVariables[playerid][pHealth]);
        SetPlayerArmour(playerid, playerVariables[playerid][pArmour]);
    }

    if(!GetPlayerInterior(playerid)) {
        SetPlayerWeather(playerid, weatherVariables[0]);
    }
    else {
        SetPlayerWeather(playerid, INTERIOR_WEATHER_ID);
    }

    syncPlayerTime(playerid);
    TogglePlayerControllable(playerid, true);

    return 1;
}
I still dont think it's a script problem, since we have an almost original version of Vortex RP, any help is appreciated.

(btw I'm the scripter, so that's why it was me who replied)


Re: CJ Skin Bug Error (Pulling my hair out -_-) - Emmet_ - 15.09.2012

Hmm, I couldn't find the problem lol It must be a problem regarding the variables.

I'll look into the Vortex 2 GM and see if I can find this problem.


Re: CJ Skin Bug Error (Pulling my hair out -_-) - MrLazyAss - 15.09.2012

No offence guys, but this is the wrong section - go to Scripting Help : http://forum.sa-mp.com/forumdisplay.php?f=12


Re: CJ Skin Bug Error (Pulling my hair out -_-) - Dodo9655 - 15.09.2012

Read the topic, this has nothing to do with scripting as far as I'm concerned.


Re: CJ Skin Bug Error (Pulling my hair out -_-) - Dodo9655 - 17.09.2012

Anyone?... I doubt I'll get much help here though