Pawno Problem
#8

pawn Code:
if (!udb_Exists(PlayerName(playerid)))
    {
        SendClientMessage(playerid,COLOR_ERROR,"This player name has already been registered. Please login before you spawn.");
        ShowLoginScreen(playerid);
        else
        if(!udb_Exists(PlayerName(playerid)))

        SendClientMessage(playerid,COLOR_ERROR,"This player name has not been registered. You must register before playing on BCCAR.");
        ShowRegisterScreen(playerid);
    }
    for(new i = 0; i < sizeof(Objects); i++) Player[playerid][view][i] = false; /////////xobj
   
    return 1;
}
//==============================================================================

public OnPlayerDisconnect(playerid, reason)
{
    if(IsPlayerNPC(playerid))
    {
        IsSpawned[playerid] =0;
        return 1;
    }
    if(afktag[playerid] == 1)
    {
        new pname[16];
        GetPlayerName(playerid,pname,16);
        strdel(pname, strlen(pname)-5, strlen(pname));
        afktag[playerid] =0;
        SetPlayerName(playerid,pname);
    }
    new string[128];
    new pname[24];
    GetPlayerName(playerid,pname,sizeof(pname));
   
    //Save Wanted Level && Jailtime
    SavedWantedLevel[playerid] =GetPlayerWantedLevel(playerid);
    SavedJailTime[playerid] =JailTime[playerid];
   
    if(PLAYERLIST_authed[playerid] == 1)
    {
        dUserSetINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
        dUserSetINT(PlayerName(playerid)).("Cash",GetPlayerMoney(playerid));
        dUserSetINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
        dUserSetINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
        dUserSetINT(PlayerName(playerid)).("Army",CanUseArmy[playerid]);
        dUserSetINT(PlayerName(playerid)).("NCIS",CanUseNCIS[playerid]);
        dUserSetINT(PlayerName(playerid)).("RegularPlayer",IsRegularPlayer[playerid]);
        dUserSetINT(PlayerName(playerid)).("DrugHouseOwner",DrugHouseOwner[playerid]);
        dUserSetINT(PlayerName(playerid)).("OttoOwner",OttoOwner[playerid]);
        dUserSetINT(PlayerName(playerid)).("TSkill",TerroristSkill[playerid]);
        dUserSetINT(PlayerName(playerid)).("RobSkill",RobSkill[playerid]);
        dUserSetINT(PlayerName(playerid)).("HasPackC4",HasPackC4[playerid]);
        dUserSetINT(PlayerName(playerid)).("HasPackRope",HasPackRope[playerid]);
        dUserSetINT(PlayerName(playerid)).("HasPackMoney",HasPackMoney[playerid]);
        dUserSetINT(PlayerName(playerid)).("SavedWantedLevel",SavedWantedLevel[playerid]);
        dUserSetINT(PlayerName(playerid)).("SavedJailTime",SavedJailTime[playerid]);
    }
   
    //Do things to the playerid
    ResetVariables(playerid);
    TextDrawHideForPlayer(playerid,VersionTD);
    TextDrawHideForPlayer(playerid,WebsiteTD);
    TextDrawDestroy(MessageTD[playerid]);
    TextDrawDestroy(JailTimer[playerid]);
    TextDrawDestroy(LocationTD[playerid]);
   
    if (PlayerInfo[playerid][pRoadblock] != 0)
    {
        RemoveRoadblock(playerid);
    }
    for(new i = 0; i < sizeof(Objects); i++) ////Xobj
    {
        if(Player[playerid][view][i])
        {
            Player[playerid][view][i] = false;
            DestroyPlayerObject(playerid,Player[playerid][objid][i]);
        }
    }
    format(string,sizeof(string),"%s Has just left the server! (%s)",pname,aDisconnectNames[reason]);
    SendClientMessageToAll(COLOR_VIOLETBLUE,string);
    format(string,sizeof(string),"1%s Has just left the server! (%s)",pname,aDisconnectNames[reason]);
    IRC_Say(gGroupID,IRC_CHANNEL,string);
    return 1;
}

//==============================================================================

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        if(strcmp(PlayerName(playerid), "Billy") == 0)
        {
            PutPlayerInVehicle(playerid,NPCTram,0);
            SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
            SetPlayerSkin(playerid,255);
            IsSpawned[playerid] =1;
            print("[NPC SPAWN] Billy has been placed in his tram.");
        }
        return 1;
    }
    new string[128];
    new pname[128];

    GetPlayerName(playerid,pname,sizeof(pname));
    //Namebanned
    if(NameBanned[playerid] == 1)
    {
        format(string,sizeof(string),"[AUTO BAN] %s(%d) has been auto banned for ban evading. (Nickname is banned).",pname,playerid);
        SendClientMessageToAll(COLOR_ADMIN,string);
       
        format(string,sizeof(string),"9[AUTO BAN] %s(%d) has been auto banned for ban evading. (Nickname is banned).",pname,playerid);
        IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
        Banning[playerid] =1;
        SetTimer("BanPlayer",700,0);
        return 1;
    }
   
    SetPlayerWantedLevel(playerid,0);
    SetPlayerToTeamColour(playerid);
    //////xobject
    PlayerObjectUpdate(playerid);
    TextDrawShowForPlayer(playerid,LocationTD[playerid]);
Reply


Messages In This Thread
Pawno Problem - by Vasu99 - 29.02.2012, 17:50
Re: Pawno Problem - by Vasu99 - 29.02.2012, 18:59
Re: Pawno Problem - by Unknownich - 29.02.2012, 19:01
Re: Pawno Problem - by Vasu99 - 29.02.2012, 19:31
Re: Pawno Problem - by arathin - 29.02.2012, 19:32
Re: Pawno Problem - by Vasu99 - 29.02.2012, 19:42
Re: Pawno Problem - by arathin - 29.02.2012, 19:47
Re: Pawno Problem - by Vasu99 - 29.02.2012, 19:49
Re: Pawno Problem - by Vasu99 - 29.02.2012, 20:23
Re: Pawno Problem - by SchurmanCQC - 29.02.2012, 20:26
Re: Pawno Problem - by Vasu99 - 29.02.2012, 20:27
Re: Pawno Problem - by Vasu99 - 29.02.2012, 20:59
Re: Pawno Problem - by arathin - 29.02.2012, 21:02
Re: Pawno Problem - by Vasu99 - 29.02.2012, 21:03
Re: Pawno Problem - by arathin - 29.02.2012, 21:04
Re: Pawno Problem - by Vasu99 - 29.02.2012, 21:10
Re: Pawno Problem - by arathin - 29.02.2012, 21:49
Re: Pawno Problem - by Vasu99 - 29.02.2012, 22:19
Re: Pawno Problem - by arathin - 29.02.2012, 22:37
Re: Pawno Problem - by Vasu99 - 29.02.2012, 23:21
Re: Pawno Problem - by Vasu99 - 01.03.2012, 09:05
Re: Pawno Problem - by Mark™ - 01.03.2012, 09:19
Re: Pawno Problem - by Vasu99 - 01.03.2012, 09:27
Re: Pawno Problem - by Mark™ - 01.03.2012, 09:30
Re: Pawno Problem - by Vasu99 - 01.03.2012, 09:33
Re: Pawno Problem - by Mark™ - 01.03.2012, 09:35
Re: Pawno Problem - by AWP Gaming - 01.03.2012, 09:49
Re: Pawno Problem - by Vasu99 - 01.03.2012, 09:52
Re: Pawno Problem - by AWP Gaming - 01.03.2012, 09:54
Re: Pawno Problem - by Vasu99 - 01.03.2012, 09:57
Re: Pawno Problem - by Vasu99 - 01.03.2012, 13:48
Re: Pawno Problem - by Vasu99 - 01.03.2012, 14:58
Re: Pawno Problem - by Vasu99 - 01.03.2012, 17:03

Forum Jump:


Users browsing this thread: 9 Guest(s)