- 0
Problema
-
Similar Content
-
- 2 answers
- 752 views
-
Problema turf
By Soryn.,
- 3 answers
- 435 views
-
- 0 replies
- 168 views
-
- 2 replies
- 342 views
-
- 1 reply
- 210 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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;
}
}
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.