pawn Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!(!strcmp(sendername, "Augusto_Mariano") || !strcmp(sendername, "Maniaco_Albrecht") || !strcmp(sendername, "Rodrigo_Breno")))
return SendClientMessage(playerid, -1, "Vc n pode usar esse cmd!");
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, COLOR_GRAD2, "USE: (/av)isar [texto]");
return 1;
}
if(TentouDivulgar(result))
{
if(cdivulgar[playerid] >= 6)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
ABroadCast(COLOR_YELLOW,string,1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return 1;
}
SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso Da Administraзгo ______________|");
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
format(string, sizeof(string), "Admin BooT_VirtuaL: %s", result);
SendClientMessageToAll(0x33FF00FF, string);
}
else
{
format(string, sizeof(string), "Admin %s: %s", sendername, result);
SendClientMessageToAll(0x33FF00FF, string);
}
}
return 1;
}
-----------------------------------------
if(strcmp(cmd, "/ir", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!(!strcmp(sendername, "Augusto_Mariano") || !strcmp(sendername, "Maniaco_Albrecht") || !strcmp(sendername, "Rodrigo_Breno")))
return SendClientMessage(playerid, -1, "Vc n pode usar esse cmd!");
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /ir [id]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo, world;
plo = ReturnUser(tmp);
world = GetPlayerVirtualWorld(plo);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] != 69)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[plo][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SetPlayerVirtualWorld(playerid, world);
SendClientMessage(playerid, 0x33FF00FF, "Vocк foi teleportado pelo Admin !");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(plo, plname, MAX_PLAYER_NAME);
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{}
else { format(string, sizeof(string), "O Admin %s Foi Atй %s.",playername,plname); }
ProxDetector(30.0, playerid, string, 0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse nгo й um player ativo.");
}
}
return 1;
}
--------------------------------------------------------------------
if(strcmp(cmd, "/trazer", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!(!strcmp(sendername, "Augusto_Mariano") || !strcmp(sendername, "Maniaco_Albrecht") || !strcmp(sendername, "Rodrigo_Breno")))
return SendClientMessage(playerid, -1, "Vc n pode usar esse cmd!");
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /trazer [id]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo, world;
plo = ReturnUser(tmp);
world = GetPlayerVirtualWorld(playerid);
if(PlayerInfo[plo][pJailed] != 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode trazer um Preso");
return 1;
}
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] != 69)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
if(PlayerInfo[playerid][pInt] > 0)
{
SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,0);
}
if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(plo,1);
PlayerInfo[plo][pInt] = 1;
}
if (GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar,world);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
}
SetPlayerVirtualWorld(plo,world);
SendClientMessage(plo, 0x33FF00FF, "Vocк foi teleportado pelo Admin !");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse nгo й um jogador ativo.");
}
}
return 1;
}
-------------------------------------------------------------------
if(strcmp(cmd, "/kick", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!(!strcmp(sendername, "Augusto_Mariano") || !strcmp(sendername, "Maniaco_Albrecht") || !strcmp(sendername, "Rodrigo_Breno")))
return SendClientMessage(playerid, -1, "Vc n pode usar esse cmd!");
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /kick [Id Do Jogador] [motivo]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] != 69)
{
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] <= ' '))
{
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, COLOR_GRAD2, "USE: /kick [Id Do Jogador] [motivo]");
return 1;
}
getdate(year, month, day);
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
format(string, sizeof(string), "AdmCmd: %s foi kickado por BooT_VirtuaL(Modo Cia), Motivo: %s (%d-%d-%d)", giveplayer, (result),day,month,year);
//KickLog(string);
format(string, sizeof(string), "AdmCmd: %s foi kickado por BooT_VirtuaL, Motivo: %s", giveplayer, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
else
{
format(string, sizeof(string), "AdmCmd: %s foi kickado por %s, Motivo: %s (%d-%d-%d)", giveplayer, sendername, (result),day,month,year);
//KickLog(string);
format(string, sizeof(string), "AdmCmd: %s foi kickado por %s, Motivo: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
Kick(giveplayerid);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse nгo й um jogador ativo.");
}
}
return 1;
}
-------------------------------------------