[POMOC]Unban

Započeo JONY, Februar 14, 2012, 23:03:26 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:BN
Detaljan opis problema:Jel ko zna kako cu napraviti unban komandu ovo je komanda koja bana igraca.pls help ako ko zna ili ima gotovu komandu
Dio skripte: COMMAND:ban(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new idx;

    if(IsPlayerConnected(playerid))
    {
    temp = strtok(params, idx);
if(!strlen(temp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561}/ban {959561}[ID/DioImena] {838361} [razlog]");
return 1;
}
giveplayerid = ReturnUser(temp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /ban {959561}[ID/DioImena] {838361} [razlog]");
return 1;
}
new playersip[128];
GetPlayerIp( giveplayerid,playersip,sizeof(playersip));
new hour,minuite,second;
gettime(hour,minuite,second);
new year, month,day;
if(PlayerInfo[giveplayerid][pPhousekey] != 255 && strcmp(giveplayer, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
Houses[PlayerInfo[giveplayerid][pPhousekey]][hBanned] = 1;
OnPropTextdrawUpdate();
}
getdate(year, month, day);
format(string, sizeof(string), " {FF0000}BAN| {FF8C8C}Igrac:%s| Admin:%s| Datum:%d.%d.%d| Vrijeme: %d:%d:%d|Razlog:%s", giveplayer, sendername ,month,day,year,hour,minuite,second, (result));
BanLog(string);
ABroadCast(COLOR_LIGHTRED, string, 1);
format(string, sizeof(string), "{FF1111}%s, {FFADAD}nazalost  ste iskljuceni/protjerani sa ovog servera.", giveplayer);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "{FF1111}Razlog: {FFADAD}%s", (result));
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "{FFADAD}Datum: %d.%d.%d., Vas IP: %s Vrijeme: %d:%d:%d",month,day,year, playersip, hour,minuite,second);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "{FFADAD}Ukoliko mislite da je ovo greska, slikajte ovo sa F8 i postajte na forum.");
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pBanovan] = 1;
SacuvajIgraca(giveplayerid);
Ban(giveplayerid);
format(string, sizeof(string), "Ban: %s | Admin: %s", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}