Jump to content
  • 0

Problema sanctiuni panel


Question

Posted

Cand dau o sanctiune de pe panel, mi-o da in continu, preia datele din panelactions si nu are o limita, gen sa se execute doar odata, se executa de un numar infinit daca nu as sterge linia de sanctiune din baza.

Un exemplu de sanctiune din pwn.

Quote

if(complaint > 0)
                    {
                        format(stringg, sizeof(stringg), "AdmPanel: %s was jailed by %s for %d minutes, reason: %s [complaint:%d]",playername,givername,actiontime,reason,complaint);
                        SendClientMessageToAll(COLOR_LIGHTRED, stringg);
                        format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint);
                    }
                    else
                    {
                        format(stringg, sizeof(stringg), "AdmPanel: %s was jailed by %s for %d minutes, reason: %s",playername,givername,actiontime,reason);
                        SendClientMessageToAll(COLOR_LIGHTRED, stringg);
                        format(reason2,sizeof(reason2),"%s",reason);
                    }
                    mysql_format(SQL, var100, sizeof(var100), "INSERT INTO punishlogs (`playerid`,`giverid`,`actionid`,`actiontime`,`reason`,`playername`,`givername`,`unixtime`) VALUES ('%d','%d','6','%d','%s','%s','%s','%d')",playerid,giverid,actiontime,reason2,playername,givername,gettime());
                    mysql_tquery(SQL,var100,"","");
                    foreach(new idd : Player)
                    {
                        if(PlayerInfo[idd][pSQLID] == playerid)
                        {
                            ResetPlayerWeaponsEx(idd);
                            ResetPlayerWeapons(idd);
                            WantedPoints[idd] = 0;
                            PlayerInfo[idd][pJailed] = 2;
                            PlayerInfo[idd][pJailTime] = actiontime*60;
                            SetPlayerInterior(idd, 10);
                            new rand;
                            rand = random(sizeof(gRandomAJailSpawns));
                            SetPlayerPosEx(idd,gRandomAJailSpawns[rand][0],gRandomAJailSpawns[rand][1],gRandomAJailSpawns[rand][2]);
                            if(dm > 0)
                            {
                                PlayerInfo[idd][pGunLic] = 0;
                                PlayerInfo[idd][pGunLicT] = 0;
                                PlayerInfo[idd][pGunLicSuspend] = dm + 1;
                            }
                        }
                    }
                }

 

 

 

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.