Jump to content
  • 0

Problema Uninvite Leader


stefanpuica

Question

Problema intalnita (descriere): Cand un Leader da Uninvite unui membru din factiunea lui, pe acel membru il scoate din factiune dar in tabelul cu membri nu se sterge acel player
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu): Uninvite Leader: http://pastebin.com/H693XHE5

Tabelul cu Membri: http://pastebin.com/KvvzAiUS

si comanda de uninvite pentru admini (cand folosesc aceasta comanda ii scoate din tabelul members): http://pastebin.com/uWAuv23E
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da, dar nu am reusit mare lucru

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

incearca asa  

if(dialogid == DIALOG_FPUNINVITE)
    {
        if(response)
        {
            new string1[300],result[30],name[30],rank,ftime,reason[128],idd;
            format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
            new Cache: membresult = mysql_query(SQL,string1);
            for(new i, j = cache_get_row_count (); i != j; ++i)
            {
                cache_get_field_content(i, "name", result); format(name, 30, result);
                ftime = cache_get_field_content_int(i, "FactionTime");
                rank = cache_get_field_content_int(i, "Rank");
                idd = cache_get_field_content_int(i, "id");
            }
            cache_delete(membresult);
            mysql_real_escape_string(inputtext, reason);
            new string2[500],query[500];
            format(string2, sizeof(string2), "%s was uninvited by %s from faction %s (rank %d) after %d days, with FP. Reason: %s.", name,PlayerInfo[playerid][pNormalName],DynamicFactions[PlayerInfo[playerid][pMember]][fName],rank,ftime,reason);
            mysql_format(SQL, query, sizeof(query), "INSERT INTO faction_logs (`text`,`player`,`leader`) VALUES ('%s','%d','%d')", string2, idd, PlayerInfo[playerid][pSQLID]);
            mysql_tquery(SQL,query,"","");
            mysql_format(SQL,string1,sizeof(string1),"UPDATE users SET `Team`='3',`Member`='0',`Leader`='0',`Rank`='0',`Model`='250',`FPunish`='40',`FWarn`='0',`FactionTime`='0',`FactionJoin`='0' WHERE `id`='%d'",Selected2[playerid]);
            mysql_tquery(SQL,string1,"","");
            foreach(Player, i)
            {
                if(PlayerInfo[pSQLID] == Selected2[playerid])
                {
                    gTeam = 3;
                    PlayerInfo[pTeam] = 3;
                    PlayerInfo[pMember] = 0;
                    PlayerInfo[pRank] = 0;
                    PlayerInfo[pLeader] = 0;
                    PlayerInfo[pFACWarns] = 0;
                    PlayerInfo[pFpunish] = 40;
                    PlayerInfo[pFactionTime] = 0;
                    PlayerInfo[pModel] = 250;
                    SetPlayerArmourEx(i, 0);
                    tazer = 0;
                    OnDuty = 0;
                    SetPlayerSkin(i,PlayerInfo[pModel]);
                    SpawnPlayer(i);
                }
            }
            format(string1, sizeof(string1),"%s was uninvited by %s from faction %s (rank %d) after %d days, with FP. Reason:      %s",name,PlayerInfo[playerid][pNormalName],DynamicFactions[PlayerInfo[playerid][pMember]][fName],rank,ftime,reason);
            Factionlog(PlayerInfo[playerid][pMember],idd,PlayerInfo[playerid][pSQLID],string1);
            SendFamilyMessage(PlayerInfo[playerid][pMember], COLOR_GENANNOUNCE, string1);
        }
        return 1;
    }

+1 daca te-am fost de ajutor

 

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Acum 20 ore, Gireada a spus:

Arata-ne mysql_log

http://pastebin.com/yAkweRUF

Am rezolvat

Am pus     PlayerInfo[pMember] = 0;
                 Update(i,pMemberx);   si acum ma scoate si din /members dupa ce imi da leaderul uninvite.

Dar totusi as vrea sa rezolv acele erori din baza de date,daca vreti sa ma ajutati

Aia cu DLonfiscate si Live am rezolvat

Edited by stefanpuica
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.