- 0
Problema
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
muresan_emanuel2001
Am adaugat un sistem de login admin, care dupa ce ai bagat parola de logare, iti mai cere un cod.
Problema e urmatoare, daca dai ESC, iti inchide dialogul, si poti sa folosesti contul.
Daca bagi codul de admin gresit, primesti kick, daca dai enter si nu scrii nimic, primesti kick.
Totul functioneaza normal cu exceptia codului..
Ondialogresponse:
if(dialogid == 6969)
{
if(!response)//Daca playerul nu raspunde
{
KickEx(playerid, "Ai refuzat sa bagi codul? Ai primit kick smechere.");
}
else
{
new inputpass[64];
format(inputpass, sizeof(inputpass), "1234");
if(strcmp(inputtext, inputpass, true) == 0)
{
new numeadmin[MAX_PLAYER_NAME], stringZ[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, numeadmin, sizeof(numeadmin));
format(stringZ, sizeof(stringZ), "[Admin] %s s-a conectat pe server.", numeadmin);
SendClientMessageToAll(0xC4C4C4FF, stringZ);
SendClientMessage(playerid, COLOR_WHITE, "Te-ai conectat cu succes ;)");
SecuritateAdmin[playerid] = true;
}
else//Daca greseste codul primeste kick
{
new numeadmin[MAX_PLAYER_NAME], stringZ[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, numeadmin, sizeof(numeadmin));
format(stringZ, sizeof(stringZ), "[KICK] %s a fost dat afara de catre gardian deoarece a gresit codul secret.", numeadmin);
SendClientMessage(playerid, COLOR_WHITE, "Ai primit kick deoarece nu ai introdus codul corect !");
KickEx(playerid, "Conectare esuata ca admin !");
}
return 1;
}
}
13 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now