17.02.2014, 07:14
pawn Код:
stock VBanID(playerid,giveid,motivo[])
{
format(NICKBAN,20,VBanPlayer(giveid));
if(playerid > -1)
{
format(Vstring,128,"'- VBan -' O jogador %s foi banido por %s. Motivo: %s",VBanPlayer(giveid),VBanPlayer(playerid),motivo);
SendClientMessageToAll(CorBan,Vstring);
GetPlayerIp(giveid, VIP, sizeof(VIP));
format(Vnewban,32,BanDir,VIP);
DOF2_CreateFile(Vnewban);
VBanSaveInfo(playerid,Vnewban,motivo,false);
format(Vnewban,32,BanDir,VBanPlayer(giveid));
DOF2_CreateFile(Vnewban);
VBanSaveInfo(playerid,Vnewban,motivo,false);
}
else
{
format(Vnewban,32,BanDir,VBanPlayer(giveid));
format(Vstring,128,"'- VBan -' O jogador %s foi banido por VBot Admin(%s). Motivo: %s",VBanPlayer(giveid),DOF2_GetString(Vnewban,"Admin"),motivo);
SendClientMessageToAll(CorBan,Vstring);
DOF2_CreateFile(Vnewban);
VBanSaveInfo(-1,Vnewban,motivo,false);
}
if(IsPlayerConnected(giveid))
VBanLoadInfo(giveid,Vnewban);
SetTimerEx("VBKick",300, false, "i", giveid);
return 1;
}