Why ? ? ?
#1

Why If I Spawn i Crash i Cant play in my Server

pawn Код:
public OnPlayerSpawn(playerid)
{
//  GangZoneShowForPlayer(playerid, dm, 0x00000096);
    //hide spawn info
    TextDrawHideForPlayer(playerid, worker0);
    TextDrawHideForPlayer(playerid, worker1);
    TextDrawHideForPlayer(playerid, pimp0);
    TextDrawHideForPlayer(playerid, pimp1);
    TextDrawHideForPlayer(playerid, golfer0);
    TextDrawHideForPlayer(playerid, golfer1);
    TextDrawHideForPlayer(playerid, triad0);
    TextDrawHideForPlayer(playerid, triad1);
    TextDrawHideForPlayer(playerid, army0);
    TextDrawHideForPlayer(playerid, army1);
    TextDrawHideForPlayer(playerid, mechanic0);
    TextDrawHideForPlayer(playerid, mechanic1);
    TextDrawHideForPlayer(playerid, medic0);
    TextDrawHideForPlayer(playerid, medic1);
    TextDrawHideForPlayer(playerid, swat0);
    TextDrawHideForPlayer(playerid, swat1);
    TextDrawHideForPlayer(playerid, chicken0);
    TextDrawHideForPlayer(playerid, chicken1);
    TextDrawHideForPlayer(playerid, toreno0);
    TextDrawHideForPlayer(playerid, toreno1);
    TextDrawHideForPlayer(playerid, pilot0);
    TextDrawHideForPlayer(playerid, pilot1);
    TextDrawHideForPlayer(playerid, nang0);
    TextDrawHideForPlayer(playerid, nang1);

    if(AccInfo[playerid][gang] != 0) SetPlayerColor(playerid, GangInfo[AccInfo[playerid][gang]][GANG_COLOR]);
//==============================================================================
// Request Register
//==============================================================================
    if(AccInfo[playerid][Registered] == 0 && ServerInfo[MustRegister] == 1)
    {
        #if USE_DIALOGS == true
        new rstring[256];
        format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
        ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_PASSWORD,"Register Account",rstring,"Register","Quit");
        #endif
    //  return 1;
    }
//==============================================================================
// Request Login
//==============================================================================
    if(ServerInfo[MustLogin] == 1 && AccInfo[playerid][Registered] == 1 && AccInfo[playerid][LoggedIn] == 0)
    {
        #if USE_DIALOGS == true
        new logstring[256];
        format(logstring,256,"That account '%s 'is Registered!\n\n Login to access your Account:",pName(playerid));
        ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_PASSWORD,"Login Account",logstring,"Login","Quit");
        #endif
    //  return 1;
    }
//==============================================================================
// Player Frozen (Prevent scape)
//==============================================================================
    AccInfo[playerid][Spawned] = 1;

    if(AccInfo[playerid][Frozen] == 1) {
        TogglePlayerControllable(playerid,false);
        return Inter_SendClientMessage(playerid,red,"|- You cant escape your punishment. You Are Still Frozen -|");
    }
//==============================================================================
// Player Jail (Prevent scape)
//==============================================================================
    if(AccInfo[playerid][Jailed] == 1) {
        SetTimerEx("JailPlayer",3000,0,"d",playerid);
        return Inter_SendClientMessage(playerid,red,"|- You cant escape your punishment. You Are Still In Jail -|");
    }
//==============================================================================
// Administrators Skins/Prevent players to use
//==============================================================================
    if(ServerInfo[AdminOnlySkins] == 1)
    {
        if( (GetPlayerSkin(playerid) == ServerInfo[AdminSkin]) || (GetPlayerSkin(playerid) == ServerInfo[AdminSkin2]))
        {
            if(AccInfo[playerid][Level] >= 1)
            GameTextForPlayer(playerid,"~b~Welcome~n~~w~Admin",3000,1);
            else
            {
                GameTextForPlayer(playerid,"~r~This Skin Is For~n~Administrators~n~Only",4000,1);
                SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
                return 1;
            }
        }
    }
    if(DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "UseSkin") == 1)
        if((AccInfo[playerid][Level] >= 1) && (AccInfo[playerid][LoggedIn] == 1))
        SetPlayerSkin(playerid,(DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "FavSkin")) );

//==============================================================================
// Verify player in CAGE
//==============================================================================
    if(AccInfo[playerid][pCaged] == 1)
    {
        SetTimerEx("CagePrevent", 300, 0, "i", playerid);
    }
    if(ServerInfo[Announce] == 1)
    TextDrawShowForPlayer(playerid, Announcements);
//==============================================================================
// Weapons
//==============================================================================
    if(ServerInfo[GiveWeap] == 1)
    {
        if(AccInfo[playerid][LoggedIn] == 1)
        {
            AccInfo[playerid][TimesSpawned]++;
            if(AccInfo[playerid][TimesSpawned] == 1)
            {
                GivePlayerWeapon(playerid,DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon1"),DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon1Ammo"));
                GivePlayerWeapon(playerid,DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon2"),DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon2Ammo"));
                GivePlayerWeapon(playerid,DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon3"),DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon3Ammo"));
                GivePlayerWeapon(playerid,DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon4"),DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon4Ammo"));
                GivePlayerWeapon(playerid,DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon5"),DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon5Ammo"));
                GivePlayerWeapon(playerid,DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon6"),DOF2_GetInt(DOF2_File(PlayerName2(playerid)), "Weapon6Ammo"));
            }
        }
    }
//------------------------------------------------------------------------------
    if(AccInfo[playerid][Level] >0) {
        HasPGP[playerid] = 1;
        HasAirP[playerid] = 1;
    }
    SetPlayerColor(playerid,COLOR_GREY);
    switch(AccInfo[playerid][team]) {
        case TEAM_WORKER: {
            GivePlayerWeapon(playerid,22,200);
            GivePlayerWeapon(playerid,6,1);
            GivePlayerWeapon(playerid,30,360);
            SetPlayerColor(playerid,COLOR_GREEN);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_PIMP: {
            GivePlayerWeapon(playerid,26,100);
            GivePlayerWeapon(playerid,29,360);
            GivePlayerWeapon(playerid,15,1);
            SetPlayerColor(playerid,COLOR_RED);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_GOLFER: {
            GivePlayerWeapon(playerid,24,100);
            GivePlayerWeapon(playerid,32,300);
            GivePlayerWeapon(playerid,2,1);
            SetPlayerColor(playerid,COLOR_YELLOW);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_TRIAD: {
            GivePlayerWeapon(playerid,32,300);
            GivePlayerWeapon(playerid,30,400);
            GivePlayerWeapon(playerid, 8, 1);
            SetPlayerColor(playerid,COLOR_PINK);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_ARMY: {
            GivePlayerWeapon(playerid,26,80);
            GivePlayerWeapon(playerid,31,300);
            GivePlayerWeapon(playerid,23,170);
            SetPlayerColor(playerid,COLOR_DARKGREEN);
            HasLawEnforcementRadio[playerid] =1;
            LawEnforcementRadio[playerid] =1;
            HasPGP[playerid] =1;
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_MECHANIC: {
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_LIGHTBLUE);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_MEDIC: {
            GivePlayerWeapon(playerid,26,100);
            GivePlayerWeapon(playerid,23,170);
            GivePlayerWeapon(playerid,9,1);
            SetPlayerColor(playerid,COLOR_BRIGHTRED);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_SWAT: {
            GivePlayerWeapon(playerid,29,360);
            GivePlayerWeapon(playerid,27,100);
            GivePlayerWeapon(playerid,3,1);
            SetPlayerColor(playerid,COLOR_ORANGE);
            hastazer[playerid] =1;
            HasLawEnforcementRadio[playerid] =1;
            HasPGP[playerid] =1;
            LawEnforcementRadio[playerid] =1;
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_CHICKEN: {
            GivePlayerWeapon(playerid, 18, 8);
            SetPlayerColor(playerid,COLOR_DARKYELLOW);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_TORENO: {
            GivePlayerWeapon(playerid,27,100);
            GivePlayerWeapon(playerid,24,100);
            GivePlayerWeapon(playerid,28,400);
            SetPlayerColor(playerid,COLOR_SKIN);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_PILOT: {
            GivePlayerWeapon(playerid, 46, 1);
            SetPlayerColor(playerid,COLOR_DARKGREY);
            HasAirP[playerid] =1;
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_DANANG: {
            GivePlayerWeapon(playerid,24,70);
            GivePlayerWeapon(playerid,27,77);
            GivePlayerWeapon(playerid,28,300);
            SetPlayerColor(playerid,COLOR_DARKRED);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_LVBALLA: {
            GivePlayerWeapon(playerid,32,100);
            GivePlayerWeapon(playerid,25,100);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_BRIGHTRED);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVGROVE: {
            GivePlayerWeapon(playerid,28,200);
            GivePlayerWeapon(playerid,30,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_DARKGREEN);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVVAGO: {
            GivePlayerWeapon(playerid,31,200);
            GivePlayerWeapon(playerid,32,100);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_LIGHTBLUE);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVAZTEC: {
            GivePlayerWeapon(playerid,27,100);
            GivePlayerWeapon(playerid,30,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_BLUE);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVTRIAD: {
            GivePlayerWeapon(playerid,27,100);
            GivePlayerWeapon(playerid,30,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_YELLOW);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVMEDIC: {
            GivePlayerWeapon(playerid,27,100);
            GivePlayerWeapon(playerid,28,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_RED);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVCOP: {
            GivePlayerWeapon(playerid,24,100);
            GivePlayerWeapon(playerid,31,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_DARKBLUE);
            hastazer[playerid] =1;
            HasLawEnforcementRadio[playerid] =1;
            LawEnforcementRadio[playerid] =1;
            HasPGP[playerid] =1;
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVFIRE: {
            GivePlayerWeapon(playerid,27,100);
            GivePlayerWeapon(playerid,28,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_ORANGE);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVARMY: {
            GivePlayerWeapon(playerid,24,100);
            GivePlayerWeapon(playerid,31,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_BROWN);
            hastazer[playerid] =1;
            HasLawEnforcementRadio[playerid] =1;
            LawEnforcementRadio[playerid] =1;
            HasPGP[playerid] =1;
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVFBI: {
            GivePlayerWeapon(playerid,24,100);
            GivePlayerWeapon(playerid,31,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_DARKBLUE);
            hastazer[playerid] =1;
            HasLawEnforcementRadio[playerid] =1;
            LawEnforcementRadio[playerid] =1;
            HasPGP[playerid] =1;
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LVCIV: {
            GivePlayerWeapon(playerid,28,200);
            GivePlayerWeapon(playerid,30,200);
            GivePlayerWeapon(playerid,4,1);
            SetPlayerColor(playerid,COLOR_WHITE);
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
            SetPlayerRandomSpawn(playerid);
        }
        case TEAM_LSCOP: {
            SetPlayerColor(playerid,COLOR_BLUE); //BLUE
            hastazer[playerid] =1;
            HasLawEnforcementRadio[playerid] =1;
            LawEnforcementRadio[playerid] =1;
            HasPGP[playerid] =1;
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_LSGROVE: {
            SetPlayerColor(playerid,COLOR_GREEN); //GREEN
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_LSVAGO: {
            SetPlayerColor(playerid,COLOR_YELLOW); //YELLOW
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_LSAZTECA: {
            SetPlayerColor(playerid,COLOR_LIGHTBLUE); //LIGHT BLUE
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_LSBALLA: {
            SetPlayerColor(playerid,COLOR_PURPLE); //Dark Red
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
        case TEAM_LSPIZZABOY: {
            SetPlayerColor(playerid,COLOR_ORANGE); //ORANGE
            if(AccInfo[playerid][Jailed] == 1) {
                SetPlayerInterior(playerid,6);
                TogglePlayerControllable(playerid,0);
                SetPlayerPos(playerid,265.1273,77.6823,1001.0391);
                SetPlayerFacingAngle(playerid,271.3259);
                Inter_SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment...Welcome back to jail!!!");
                return 1;
            }
        }
    }
    SetPlayerInterior(playerid, 0);
    GameTextForPlayer(playerid,"~y~PwN Them All!!!", 3000, 5);
    PlayerPlaySound(playerid,SOUND_OFF,-1421.1034,1488.5735,11.8084);
    IsSpawned[playerid] = 1;
    SpawnPlayerAtHouse(playerid);
    return 1;
}
//====================================LV Random Spawns==========================
public SetPlayerRandomSpawn(playerid)
{
    if (iSpawnSet[playerid] == 1)
    {
        new rand = random(sizeof(gCopPlayerSpawns));
        SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
        SetPlayerFacingAngle(playerid, 270.0);
    }
    else if (iSpawnSet[playerid] == 0)
    {
        new rand = random(sizeof(gRandomPlayerSpawns));
        SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
    }
    return 1;
}
//============================Anti-Team kill Script=============================
public OnPlayerDeath(playerid, killerid, reason)
{
    new msg[128],reasonMsg[32], pname[MAX_PLAYER_NAME], string[128], deathreason[20];
    SendDeathMessage(killerid,playerid,reason);
    GameTextForPlayer(playerid,"~r~~h~OWNED",10000,1);
    GetPlayerName(playerid, pname, sizeof(pname));
    GetWeaponName(reason, deathreason, 20);
    new pstring[128]; //player message
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer, sizeof(killer));

    if(InDM[playerid]==1) InDM[playerid]=0;
    SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000); //Reset world to player
//--------------------------------Death Reasons---------------------------------
    if(killerid!=INVALID_PLAYER_ID)
    {
        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(string, sizeof(string), "*** %s killed %s. (%s)", killer, pname, reasonMsg);
        format(msg, sizeof(msg), "04*** %s killed %s. (%s)", killer, pname, reasonMsg);
    }
    else
    {
        switch (reason)
        {
            case 53:
            {
                format(string, sizeof(string), "*** %s died. (Drowned)", pname);
                format(msg, sizeof(msg), "04*** %s died. (Drowned)", pname);
            }
            case 54:
            {
                format(string, sizeof(string), "*** %s died. (Collision)", pname);
                format(msg, sizeof(msg), "04*** %s died. (Collision)", pname);
            }
            default:
            {
                format(string, sizeof(string), "*** %s died.", pname);
                format(msg, sizeof(msg), "04*** %s died.", pname);
            }
        }
    }
//------------------------------------TeamKill----------------------------------
    if(killerid != INVALID_PLAYER_ID && AccInfo[playerid][team] == AccInfo[killerid][team])
    {
        KillerID[playerid] = killerid;
        new warning[128];
        format(warning, sizeof(warning), "Be careful! You You may Be punished for Team Killing!");
        Inter_SendClientMessage(killerid, 0xFFFF00AA, warning);
        ShowMenuForPlayer(TK,playerid);
        DropWeapons(playerid);
        IsSpawned[playerid] = 0;
        cuffed[playerid] = 0;
        Tazed[playerid] = 0;
        hastazer[playerid] = 0;
        LawEnforcementRadio[playerid] = 0;
        HasLawEnforcementRadio[playerid] = 0;
        ReqBk[playerid] = 0;
        ReqBkRecent[playerid] = 0;
        ReportedRecent[playerid] = 0;
        VisitReq[playerid] = 0;
        EscapedConvict[playerid] = 0;
        VisitReqExpires[playerid] = 0;
        StoleCopCarRecent[playerid] = 0;
        triedtoescaperecent[playerid] = 0;
        JailTimeServed[playerid] = 0;
        copshavevc[playerid] = 0;
        commitedcrimerecently[playerid] = 0;
        wantsheal[playerid] = 0;
        wantscure[playerid] = 0;
        InfectedPlyRecent[playerid] = 0;
        RapedPlyRecent[playerid] =0;
        wantsweed[playerid] = 0;
        playeronweed[playerid] = 0;
        playertookweed[playerid] = 0;
        HasWeedBag[playerid] = 0;
        CuffedTime[playerid] = 0;
        cannotescapejail[playerid] = 0;
        RobbedPlyRecent[playerid] = 0;
        beenrobbedrecently[playerid] = 0;
        HasWallet[playerid] = 0;
        OldCash[playerid] = 0;
        Chlamydia[playerid] = 0;
        instunt[playerid] = 0;
        InDM[playerid] =0;
        NeedsHelp[playerid] = 0;
        Helping[playerid] = -1;
        return 1;
    }
//-----------------------------LuxAdmin System----------------------------------
    #if USE_STATS == true
    AccInfo[playerid][Deaths]++;
    #endif
    InDuel[playerid] = 0;

    if(AccInfo[playerid][pCaged] == 1)
    {
        cage[playerid]  = DestroyObject(cage[playerid]);
        cage2[playerid] = DestroyObject(cage2[playerid]);
        cage3[playerid] = DestroyObject(cage3[playerid]);
        cage4[playerid] = DestroyObject(cage4[playerid]);
    }

    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
        #if USE_STATS == true
        AccInfo[killerid][Kills]++;
        #endif
//==============================================================================
// In Duel
//==============================================================================
        if(InDuel[playerid] == 1 && InDuel[killerid] == 1)
        {
            GameTextForPlayer(playerid,"Loser!",3000,3);
            GameTextForPlayer(killerid,"Winner!",3000,3);
            InDuel[killerid] = 0;
            SetPlayerPos(killerid, 0.0, 0.0, 0.0);
            SpawnPlayer(killerid);
        }
        else if(InDuel[playerid] == 1 && InDuel[killerid] == 0)
        {
            GameTextForPlayer(playerid,"Loser !",3000,3);
        }
    }
//==============================================================================
// Spectate
//==============================================================================
    for(new x=0; x<MAX_PLAYERS; x++)
        if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && AccInfo[x][SpecID] == playerid)
        AdvanceSpectate(x);
//-------------------------------------Normal-----------------------------------
    new kstring[128]; //killer message
    GetPlayerName(playerid, pname, sizeof(pname));
    format(kstring, sizeof(kstring), "~b~Haha Ya 0wned %s",pname);
    GameTextForPlayer(killerid, kstring, 4000, 3);
    new kname[MAX_PLAYER_NAME];   //killername
    GetPlayerName(killerid, kname, sizeof(kname));
    format(pstring, sizeof(pstring), "~r~:( you got 0wned by %s",kname);
    GameTextForPlayer(playerid, pstring, 4000, 3);
   
    new kscore=GetPlayerScore(killerid);
    SetPlayerScore(killerid,kscore++);
    new moneytemp;
    moneytemp = GetPlayerCash(playerid)/8;
    if(moneytemp<=5000) {
        GivePlayerCash(killerid,moneytemp);
        GivePlayerCash(playerid,-moneytemp);
    }
    else if(moneytemp>5000) {
        GivePlayerCash(killerid,5000);
        GivePlayerCash(playerid,-5000);
   
    }
    Inter_SendClientMessageToAll(COLOR_RED, string);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
   
    DropWeapons(playerid);
    IsSpawned[playerid] = 0;
    cuffed[playerid] = 0;
    Tazed[playerid] = 0;
    hastazer[playerid] = 0;
    LawEnforcementRadio[playerid] = 0;
    HasLawEnforcementRadio[playerid] = 0;
    ReqBk[playerid] = 0;
    ReqBkRecent[playerid] = 0;
    ReportedRecent[playerid] = 0;
    VisitReq[playerid] = 0;
    EscapedConvict[playerid] = 0;
    VisitReqExpires[playerid] = 0;
    StoleCopCarRecent[playerid] = 0;
    triedtoescaperecent[playerid] = 0;
    JailTimeServed[playerid] = 0;
    copshavevc[playerid] = 0;
    commitedcrimerecently[playerid] = 0;
    wantsheal[playerid] = 0;
    wantscure[playerid] = 0;
    InfectedPlyRecent[playerid] = 0;
    RapedPlyRecent[playerid] =0;
    wantsweed[playerid] = 0;
    playeronweed[playerid] = 0;
    playertookweed[playerid] = 0;
    HasWeedBag[playerid] = 0;
    CuffedTime[playerid] = 0;
    cannotescapejail[playerid] = 0;
    RobbedPlyRecent[playerid] = 0;
    beenrobbedrecently[playerid] = 0;
    HasWallet[playerid] = 0;
    OldCash[playerid] = 0;
    Chlamydia[playerid] = 0;
    instunt[playerid] = 0;
    InDM[playerid] =0;
    NeedsHelp[playerid] = 0;
    Helping[playerid] = -1;
    return 1;
}

Reping Status ( [ON] , [OFF] )
Reply
#2

Show us your code under OnPlayerSpawn.

Nobody can help you without you showing your code...
Reply
#3

OK EDITED
Reply
#4

Me Is USING $$$Pimp Satdm GameMode
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)