Spawn + Command Bugs
#1

This is a weird bug randomly happening. Ive tested it many times. If i killed the player with the weapon its fine. But if i used commands to kill the player eventually they will spawn in BlueBerry and command will say Unknown. Bug shown in video.

http://www.youtube.com/watch?v=n9tX9...ature=*********

We tested in another server and nothing happens. It may be a plugin problem but i updated plugins and includes but same results.

pawn Код:
public OnPlayerSpawn(playerid)
{
    new MexiSpawns = random(sizeof(MexicanSpawns));
    new AmericSpawns = random(sizeof(AmericanSpawns));
    new BPSpawns = random(sizeof(BorderPatrolSpawns));
    GivePlayerWeapon(playerid, Info[playerid][WeaponSlot1], Info[playerid][WeaponSlot1_Ammo]);
    GivePlayerWeapon(playerid, Info[playerid][WeaponSlot2], Info[playerid][WeaponSlot2_Ammo]);
    GivePlayerWeapon(playerid, Info[playerid][WeaponSlot3], Info[playerid][WeaponSlot3_Ammo]);
    GivePlayerWeapon(playerid, Info[playerid][WeaponSlot4], Info[playerid][WeaponSlot4_Ammo]);
    GivePlayerWeapon(playerid, Info[playerid][WeaponSlot5], Info[playerid][WeaponSlot5_Ammo]);
    GivePlayerWeapon(playerid, Info[playerid][WeaponSlot6], Info[playerid][WeaponSlot6_Ammo]);
    switch(Info[playerid][Team])
    {
        case Mexicans:
        {
            SetPlayerPos(playerid, MexicanSpawns[MexiSpawns][0], MexicanSpawns[MexiSpawns][1], MexicanSpawns[MexiSpawns][2]);
            SetPlayerFacingAngle(playerid, MexicanSpawns[MexiSpawns][3]);
            SetPlayerColor(playerid,COLOR_MEXICAN);
            Update3DTextLabelText(Info[playerid][team_label], COLOR_MEXICAN, "Mexican");
            TextDrawHideForPlayer(playerid, MexicansTD);
            TextDrawHideForPlayer(playerid, border1);
            TextDrawHideForPlayer(playerid, border2);
        }
        case Americans:
        {
            SetPlayerPos(playerid, AmericanSpawns[AmericSpawns][0], AmericanSpawns[AmericSpawns][1], AmericanSpawns[AmericSpawns][2]);
            SetPlayerFacingAngle(playerid, AmericanSpawns[AmericSpawns][3]);
            SetPlayerColor(playerid,COLOR_AMERICAN);
            Update3DTextLabelText(Info[playerid][team_label], COLOR_AMERICAN, "American");
            TextDrawHideForPlayer(playerid, AmericansTD);
            TextDrawHideForPlayer(playerid, border1);
            TextDrawHideForPlayer(playerid, border2);
        }
        case BP:
        {
            SetPlayerPos(playerid, BorderPatrolSpawns[BPSpawns][0], BorderPatrolSpawns[BPSpawns][1], BorderPatrolSpawns[BPSpawns][2]);
            SetPlayerFacingAngle(playerid, BorderPatrolSpawns[BPSpawns][3]);
            SetPlayerColor(playerid,COLOR_BP);
            Update3DTextLabelText(Info[playerid][team_label], COLOR_BP, "Border Patrol");
            TextDrawHideForPlayer(playerid, BorderPatrolsTD);
            TextDrawHideForPlayer(playerid, border1);
            TextDrawHideForPlayer(playerid, border2);
        }
    }
    SetPlayerHealth(playerid, 99999);
    SetTimerEx("SpawnKill",10000,false,"i",playerid);
    Info[playerid][SpawnProtected] = true;
    Info[playerid][Spawned] = true;
    GangZoneShowForPlayer(playerid, gzone, 0xFF000046);
    TextDrawShowForPlayer(playerid, randommsg);
    tInfo[Info[playerid][Team]][Players]++;
    if(Info[playerid][FirstSpawn])
    {
        Info[playerid][FirstSpawn] = false;
        Attach3DTextLabelToPlayer(Info[playerid][team_label],playerid,0.0, 0.0, 0.7);
    }
    return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[128];
    SetPlayerScore(killerid,GetPlayerScore(killerid) +2);
    SendClientMessage(killerid,COLOR_GREEN,"Server: You have gained 2 score and $10,000");
    SetPlayerScore(playerid,GetPlayerScore(playerid) -1);
    SendClientMessage(playerid,COLOR_RED,"Server: You have lost 1 score and $5,000");
    SendDeathMessage(killerid,playerid,reason);
    GivePlayerMoneyEx(killerid,10000);
    GivePlayerMoneyEx(playerid,-5000);
    Info[killerid][Kills]++;
    Info[playerid][Spawned] = false;
   
    tInfo[Info[playerid][Team]][Players]--;

    TextDrawHideForPlayer(playerid, randommsg);

    new
        msg[128],
        killerName[MAX_PLAYER_NAME],
        reasonMsg[32],
        playerName[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killerName, sizeof(killerName));
    GetPlayerName(playerid, playerName, sizeof(playerName));
    if (killerid != INVALID_PLAYER_ID)
    {
        Info[playerid][Deaths] ++;
        switch (reason)
        {
            case 0:
            {
                reasonMsg = "Unarmed";
            }
            case 1:
            {
                reasonMsg = "Brass Knuckles";
            }
            case 2:
            {
                reasonMsg = "Golf Club";
            }
            case 3:
            {
                reasonMsg = "Night Stick";
            }
            case 4:
            {
                reasonMsg = "Knife";
            }
            case 5:
            {
                reasonMsg = "Baseball Bat";
            }
            case 6:
            {
                reasonMsg = "Shovel";
            }
            case 7:
            {
                reasonMsg = "Pool Cue";
            }
            case 8:
            {
                reasonMsg = "Katana";
            }
            case 9:
            {
                reasonMsg = "Chainsaw";
            }
            case 10:
            {
                reasonMsg = "Dildo";
            }
            case 11:
            {
                reasonMsg = "Dildo";
            }
            case 12:
            {
                reasonMsg = "Vibrator";
            }
            case 13:
            {
                reasonMsg = "Vibrator";
            }
            case 14:
            {
                reasonMsg = "Flowers";
            }
            case 15:
            {
                reasonMsg = "Cane";
            }
            case 22:
            {
                reasonMsg = "Pistol";
            }
            case 23:
            {
                reasonMsg = "Silenced Pistol";
            }
            case 24:
            {
                reasonMsg = "Desert Eagle";
            }
            case 25:
            {
                reasonMsg = "Shotgun";
            }
            case 26:
            {
                reasonMsg = "Sawn-off Shotgun";
            }
            case 27:
            {
                reasonMsg = "Combat Shotgun";
            }
            case 28:
            {
                reasonMsg = "MAC-10";
            }
            case 29:
            {
                reasonMsg = "MP5";
            }
            case 30:
            {
                reasonMsg = "AK-47";
            }
            case 31:
            {
                if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
                {
                    switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
                    {
                        case 447:
                        {
                            reasonMsg = "Sea Sparrow Machine Gun";
                        }
                        default:
                        {
                            reasonMsg = "M4";
                        }
                    }
                }
                else
                {
                    reasonMsg = "M4";
                }
            }
            case 32:
            {
                reasonMsg = "TEC-9";
            }
            case 33:
            {
                reasonMsg = "Rifle";
            }
            case 34:
            {
                reasonMsg = "Sniper Rifle";
            }
            case 37:
            {
                reasonMsg = "Fire";
            }
            case 38:
            {
                if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
                {
                    switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
                    {
                        case 425:
                        {
                            reasonMsg = "Hunter Machine Gun";
                        }
                        default:
                        {
                            reasonMsg = "Minigun";
                        }
                    }
                }
                else
                {
                    reasonMsg = "Minigun";
                }
            }
            case 41:
            {
                reasonMsg = "Spraycan";
            }
            case 42:
            {
                reasonMsg = "Fire Extinguisher";
            }
            case 49:
            {
                reasonMsg = "Vehicle Collision";
            }
            case 50:
            {
                if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
                {
                    switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
                    {
                        case 417, 425, 447, 465, 469, 487, 488, 497, 501, 548, 563:
                        {
                            reasonMsg = "Helicopter Blades";
                        }
                        default:
                        {
                            reasonMsg = "Vehicle Collision";
                        }
                    }
                }
                else
                {
                    reasonMsg = "Vehicle Collision";
                }
            }
            case 51:
            {
                if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
                {
                    switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
                    {
                        case 425:
                        {
                            reasonMsg = "Hunter Rockets";
                        }
                        case 432:
                        {
                            reasonMsg = "Rhino Turret";
                        }
                        case 520:
                        {
                            reasonMsg = "Hydra Rockets";
                        }
                        default:
                        {
                            reasonMsg = "Explosion";
                        }
                    }
                }
                else
                {
                    reasonMsg = "Explosion";
                }
            }
            default:
            {
                reasonMsg = "Unknown";
            }
        }
        format(msg, sizeof(msg), "04*** %s killed %s. (%s)", killerName, playerName, reasonMsg);
    }
    else
    {
        switch (reason)
        {
            case 53:
            {
                format(msg, sizeof(msg), "04*** %s died. (Drowned)", playerName);
            }
            case 54:
            {
                format(msg, sizeof(msg), "04*** %s died. (Collision)", playerName);
            }
            default:
            {
                format(msg, sizeof(msg), "04*** %s died.", playerName);
            }
        }
    }
    IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
    return 1;
}
pawn Код:
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
[07:57:13] [debug] #0  00000008 in OnEnterExitModShop () from SA_BP.beta.amx
[07:57:13] [debug] Backtrace (most recent call first):
[07:57:13] [debug]   Stack index (STK) is 0x1C09BC, stack top (STP) is 0x1C09B8
[07:57:13] [debug] Run time error 7: "Stack underflow"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)