if(strcmp(cmd,"/ban", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if (pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5)
{
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "Uso: /ban [id] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if (IsPlayerConnected(plid))
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if (!strlen(result))
{
SendClientMessage(playerid, Vermelho, "Uso: /banir [id] [motivo]");
}
else
{
new year, month, day;
getdate(year, month, day);
format(string, sizeof(string), "(INFO) %s baniu o Jogador: %s. || Razгo: %s || %d-%d-%d", aname, pname, result, month, day, year);
BanLog(string);
SendClientMessage(plid, 0x80FF00AA, "» Vocк foi banido deve ter feito alguma merda");
SendClientMessage(plid, 0xFFFFFFAA, "» Se foi banido injustamente Tire uma ''SS'' e tente o contato com um de nossos Admins!");
GameTextForPlayer(plid, "~r~banido", 2500, 3);
format(string, sizeof(string), "(INFO) O Administrador %s baniu o jogador: %s. || Razгo: %s.", aname, pname, result);
SendClientMessageToAll(tcadm, string);
dini_IntSet("banidos.ini", pname, 1);
Ban(plid);
}
}
else
{
format(string, sizeof(string), "(ERRO) ID : %d nгo й valido!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
if(strcmp(cmd,"/ban", true) == 0)
{
new aname[MAX_PLAYER_NAME];
new giveplayerid;
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if (pAdmin[giveplayerid] == 5) return SendClientMessage(playerid, -1, "Vocк nгo pode banir um Admin Dono ...!");
if (pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5)
{
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "Uso: /ban [id] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if (IsPlayerConnected(plid))
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if (!strlen(result))
{
SendClientMessage(playerid, Vermelho, "Uso: /banir [id] [motivo]");
}
else
{
new year, month, day;
getdate(year, month, day);
format(string, sizeof(string), "(INFO) %s baniu o Jogador: %s. || Razгo: %s || %d-%d-%d", aname, pname, result, month, day, year);
BanLog(string);
SendClientMessage(plid, 0x80FF00AA, "» Vocк foi banido deve ter feito alguma merda");
SendClientMessage(plid, 0xFFFFFFAA, "» Se foi banido injustamente Tire uma ''SS'' e tente o contato com um de nossos Admins!");
GameTextForPlayer(plid, "~r~banido", 2500, 3);
format(string, sizeof(string), "(INFO) O Administrador %s baniu o jogador: %s. || Razгo: %s.", aname, pname, result);
SendClientMessageToAll(tcadm, string);
dini_IntSet("banidos.ini", pname, 1);
Ban(plid);
}
}
else
{
format(string, sizeof(string), "(ERRO) ID : %d nгo й valido!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
if(strcmp(cmd, "/ban", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "Uso: /ban [id] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(IsPlayerConnected(plid)){
if(pAdmin[plid] == 5){
SendClientMessage(playerid, 0x80FF00AA, "» Vocк foi banido Por tentar banir um dono!");
format(string, sizeof(string), "(INFO) ADM BOT baniu o jogador: %s. || Razгo: Tentou Banir um Dono do Servidor.", pname);
SendClientMessageToAll(Vermelho, string);
Ban(playerid);
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, Vermelho, "Uso: /banir [id] [motivo]");
}else{
new year, month,day,hs,min,seg;
getdate(year, month, day);
gettime(hs,min,seg);
format(string, sizeof(string), "(INFO) %s baniu o Jogador: %s. || Razгo: %s || [%d-%d-%d | %d:%d.%d]", aname, pname,result,month,day,year,hs,min,seg);
new ipv2[256];
GetPlayerIp(plid,ipv2,sizeof ipv2);
DOF2_SetString(GetName(plid),ipv2,string);
BanLog(string);
OnPlayerText(plid,"Esses adms e guardioes(Helpers) sao tudo v.i.a.d.o vai se f.u.d.e vcs seus p.u.t.a.s");
SendClientMessage(plid, 0x80FF00AA, "» Vocк foi banido deve ter feito alguma merda");
SendClientMessage(plid, 0xFFFFFFAA, "» Se foi banido injustamente Tire uma ''SS'' e tente o contato com um de nossos Admins/Forum!");
GameTextForPlayer(plid,"~r~banido", 2500, 3);
format(string, sizeof(string), "(INFO) O Administrador %s baniu o jogador: %s. || Razгo: %s.", aname,pname,result);
SendClientMessageToAll(Vermelho, string);
DOF2_SetInt("banidos.ini",pname,1);
GetPlayerIp(plid,ipv2,sizeof ipv2);
DOF2_SetString("banidos.file",ipv2,string);
DOF2_SetString("banidos.file",GetName(plid),ipv2);
DOF2_SetString("banidos.file",ipv2,ipv2);
Kick(plid);
}
}
else{
format(string, sizeof(string), "(ERRO) ID : %d nгo й valido!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
C:\Users\Cliente\Desktop\Servidor\gamemodes\Backup\BVR.pwn(5394) : error 017: undefined symbol "plid"
if (!strlen(result))
{
SendClientMessage(playerid, Vermelho, "Uso: /banir [id] [motivo]");
}
else
{
if (pAdmin[plid] == 5) return SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode banir um amdin level 5");
new year, month, day;
getdate(year, month, day);
format(string, sizeof(string), "(INFO) %s baniu o Jogador: %s. || Razгo: %s || %d-%d-%d", aname, pname, result, month, day, year);
BanLog(string);
SendClientMessage(plid, 0x80FF00AA, "» Vocк foi banido deve ter feito alguma merda");
SendClientMessage(plid, 0xFFFFFFAA, "» Se foi banido injustamente Tire uma ''SS'' e tente o contato com um de nossos Admins!");
GameTextForPlayer(plid, "~r~banido", 2500, 3);
format(string, sizeof(string), "(INFO) O Administrador %s baniu o jogador: %s. || Razгo: %s.", aname, pname, result);
SendClientMessageToAll(tcadm, string);
dini_IntSet("banidos.ini", pname, 1);
Ban(plid);
}
Poem aqui:
pawn Код:
|