Skripta koju koristim: Moja
Detaljan opis problema: Nije problem, nego zanima me kako da uradim kad se /rcon loginas da zamenim text kako ja ocu, da nepise SERVER: You are logged in as admin, nego kako ja zamenim...... I sve ostalo ako pogresis password da i to zamenim :P ... Unapred Hvala. Trazio sam ali nemogu da nadjem...
Dio skripte: Nemam nista
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
public OnRconLoginAttempt(ip[], password[], success)
{
if(success) return SendClientMessage(playerid,-1,"Ulogirani ste");
else return SendClientMessage(playerid,-1,"Pogrešna lozinka");
return true;
}
Citat: Get busy living or Get busy dying poslato Januar 12, 2012, 04:23:24 PRE PODNE
public OnRconLoginAttempt(ip[], password[], success)
{
if(success) return SendClientMessage(playerid,-1,"Ulogirani ste");
else return SendClientMessage(playerid,-1,"Pogrešna lozinka");
return true;
}
Ne mozes sa playerid, izbacice mu da nije definiran
Citat: Get busy living or Get busy dying poslato Januar 12, 2012, 04:23:24 PRE PODNE
public OnRconLoginAttempt(ip[], password[], success)
{
if(success) return SendClientMessage(playerid,-1,"Ulogirani ste");
else return SendClientMessage(playerid,-1,"Pogrešna lozinka");
return true;
}
Hvala, to imam , a kad testam na kucnom serveru radi, a kad na Hostingu neradi, moze neka pomoc?
Znaci tamo sve radi a tu sve po starom -.-"
Citat: [CЯP] joXy_ poslato Januar 12, 2012, 04:28:41 PRE PODNE
Citat: Get busy living or Get busy dying poslato Januar 12, 2012, 04:23:24 PRE PODNE
public OnRconLoginAttempt(ip[], password[], success)
{
if(success) return SendClientMessage(playerid,-1,"Ulogirani ste");
else return SendClientMessage(playerid,-1,"Pogrešna lozinka");
return true;
}
Ne mozes sa playerid, izbacice mu da nije definiran
Uh hvala na podsjetniku , zaboravio sam
public OnRconLoginAttempt(ip[], password[], success)
{
for(new playerid;playerid<MAX_PLAYERS;playerid++) {
if(success) return SendClientMessage(playerid,-1,"Ulogirani ste");
else return SendClientMessage(playerid,-1,"Pogrešna lozinka"); }
return true;
}
Sada probaj.
Jel ovo valja?
public OnRconLoginAttempt(ip[], password[], success)
{
new string[128];
if(!success) //If the password was incorrect
{
printf("POGRESAN RCON PASSWORD PIKUSAO GA JE IP %s A KORISTIO PASSWORD: %s",ip, password);
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
{
new sendername[MAX_PLAYER_NAME];
SendClientMessage(i, COLOR_LIGHTRED, "Pogresan Rcon Password. Bye!"); //Send a message
Kick(i); //Sad ga lepo kick-a
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmWarn: Igrac %s je pokusao provaliti rcon password. Upisao je password: %s",sendername, password);
SendAdminMessage(COLOR_LIGHTRED, string);
}
}
}
return 1;
}
To si samo iskopirao sa wiki , pa ja sam ti dao što si tražio , ti stavljaj što hoćeš.