Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new wrong[MAX_PLAYERS];
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
- {
- if(!strcmp(ip, PlayerIP(playerid), true))
- {
- if(wrong[playerid] < 3)
- {
- wrong[playerid]++;
- new printas[150];
- format(printas, 150, "Žaidėjas %s(%s) Suvedė neteisingai slaptažodį(%s) %d kartą.", PlayerName(playerid), ip, password, wrong[playerid]);
- print(printas);
- }
- else if(wrong[playerid] > 2)
- {
- SendClientMessage(playerid, 0xFF0000FF, "Nelysk kur nereikia!");
- new printas[150];
- format(printas, 150, "Žaidėjas %s(%s) Suvedė neteisingai slaptažodį(%s) 3 kartą ir buvo išmestas.", PlayerName(playerid), ip, password);
- print(printas);
- BanEx(playerid, "AntiRconLogin");
- }
- }
- }
- }
- return 1;
- }
- PlayerName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- return name;
- }
- PlayerIP(playerid)
- {
- new ip[16];
- GetPlayerName(playerid, ip, 16);
- return ip;
- }
Advertisement
Add Comment
Please, Sign In to add comment