Skripta koju koristim: CLRP
Problem: Kada banam nekog igraca automatski mu bana i ip adresu ja bih da smao bana profil a ne i ip...
Komanda unban mi ne radi upisem nick igraca ali i dalje ostaje banan... mozel mi neko pomoci
Slike:// Videio://
Dio skripte:
Dio skripte.....
if(strcmp(cmd, "/ban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/ban [Korisnicki ID ili Ime Korisnika] ");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo >= 4)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext <= ' '))
{
idx++;
}
new offset = idx;
new result;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext;
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/ban [Korisnicki ID ili Ime Korisnika] ");
return 1;
}
new id = strval(tmp);
new ip;
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "{FF3300}BAN | %s, Admin: %s, Razlog: %s", giveplayer, sendername, (result));
SendAdminMessage(COLOR_YELLOW, string);
format(string, sizeof(string), "{FF6644}Upozorenje! - Igracev level veci od 1_______________", giveplayer,id);
if(PlayerInfo >= 2)
SendClientMessage(playerid,COLOR_YELLOW, string);
format(string, sizeof(string), "Taj igrac ima veci level od 1 i stoga je potrebno staviti njegov ban na forum! slikaj sa f8 i postaj!", giveplayer,id);
if(PlayerInfo >= 2)
SendClientMessage(playerid,COLOR_GREEN, string);
format(string, sizeof(string), "Svatko je obavezan postati ban igraca ciji je level veci od 1!", giveplayer,id);
if(PlayerInfo >= 2)
SendClientMessage(playerid,COLOR_YELLOW, string);
format(string, sizeof(string), "{FF6644}Informacije o bananom igracu | Nick: %s, ID: %d, Level: %d", giveplayer,id,PlayerInfo);
SendClientMessage(playerid,COLOR_YELLOW, string);
GetPlayerIp(id,ip,15);
format(string, sizeof(string), "{FF6644}IP Adresa bananog igraca: %s. Adresa sa banom nije banana!", ip);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_YELLOW, "Ukoliko zelis banati i ip,pisi /banip [ip koj pise iznad ove poruke]");
format(string, sizeof(string), "Ban | %s, Admin: %s", giveplayer, sendername, (result),month,day,year);
BanLog(string);
SendClientMessage(giveplayerid, COLOR_YELLOW, " ");
SendClientMessage(giveplayerid, COLOR_YELLOW, " ");
SendClientMessage(giveplayerid, COLOR_YELLOW, " ");
SendClientMessage(giveplayerid, COLOR_YELLOW, " ");
SendClientMessage(giveplayerid, COLOR_YELLOW, " ");
SendClientMessage(giveplayerid, COLOR_YELLOW, " ");
SendClientMessage(giveplayerid, COLOR_RED, "___________________________________________________________________");
SendClientMessage(giveplayerid, COLOR_RED, "___________________________________________________________________");
SendClientMessage(giveplayerid, COLOR_YELLOW, "ISKLJUCENI STE SA SERVERA(Banani)");
format(string, sizeof(string), "%s iskljucen(Banan) si sa servera od %s", giveplayer, sendername, (result));
SendClientMessage(giveplayerid, COLOR_RED, string);
format(string, sizeof(string), "Razlog iskljucenja: %s", (result));
SendClientMessage(giveplayerid, COLOR_RED, string);
getdate(year, month, day);
GetPlayerIp(id,ip,15);
format(string, sizeof(string), "Datum bana: %d-%d-%d | Vas IP je: %s", month,day,year,ip);
SendClientMessage(giveplayerid, COLOR_RED, string);
SendClientMessage(giveplayerid, COLOR_RED, "Ovim banom vas korisnicki racun je suspendiran na ne određeno vremenski period");
SendClientMessage(giveplayerid, COLOR_RED, "Ukoliko mislis da BAN nije utemeljen slikaj (F😎 i prijavi to na forumu.");
SendClientMessage(giveplayerid, COLOR_RED, "Vas account je zakljucan,a vasa IP adresa je i dalje validna.");
format(string, sizeof(string), "{FF3300}Ban | %s, Admin: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_RED, string);
PlayerInfo = PlayerInfo;
PlayerInfo = -999;
Kick(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), " %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
if (strcmp(cmd, "/unban", true)==0)
{
if((IsPlayerAdmin(playerid)) || PlayerInfo >=1337)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koristi: /unban ");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(giveplayer));
format(string, 256, "{FFFFFF}|"COL_RED"BC{FFFFFF}| %s je unbanovao %s-a", sendername, tmp);
ABroadCast(COLOR_YELLOW,string,1);
format(string, 256, "{FFFFFF}|"COL_RED"BC{FFFFFF}| %s je unbanovao %s-a", sendername, tmp);
printf(string);
format(string,sizeof(string),"%s.ini",tmp);
fremove(string);
SendClientMessage(playerid, COLOR_WHITE, "Igrac je unbanovan");
SendRconCommand(string);
SendRconCommand("reloadbans");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}
Zaključano
[Pomoc] Ban i Unban
307
pregleda
5
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
pre 12 godina
Ermin Smith wrote on February 10, 2013, 12:15 am:
pod enum za pInfo dodas ovako
i onda:
zamjenis sa:
i onplayerconnect
ako mu je pLocked vece od 0 da ga kick-a.. (bez Ban funkcije ako ne zelis IP bna)
pBanovani onda:
Ban(giveplayerid); zamjenis sa:
PlayerInfo = 1;i onplayerconnect
ako mu je pLocked vece od 0 da ga kick-a.. (bez Ban funkcije ako ne zelis IP bna)
To je samo dio koji si izvadio iz GM, daj mu i ostalo da ja ne pisem sada...
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava