18.05.2016, 21:46
tou com um problema na minha gm na parte de puxa e ir atй alguem, coloquei permissгo para uns cargo mais acabou dando bug e nгo sei o motivo e como resolver. o bug foi , todos consegue dar /ir ou puxar alguйm ate ele, alguem sabe como resolver?
--------------------------------------------------------------------------------------------------------------------------------
IR - PWN =
-------------
dcmd_ir(playerid, params[])
{
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 1 || Player[playerid][pMotoTaxi] >= 1 || Player[playerid][pReporterLS] >= 1 || Player[playerid][pCORE] >= 5 || Player[playerid][pBOPE] >= 5 || Player[playerid][pEXC] >= 5 || Player[playerid][pPMRJ] >= 5 || Player[playerid][pFrente] >= 1 || Player[playerid][pHelper] >= 300 || Player[playerid][pGerente] >= 1 || Player[playerid][pDM] < 1 || Player[playerid][pLider] < 1 || Player[playerid][pFEDERAL] >= 4)
{
if(!strlen(params))
return SendClientMessage(playerid, COR_USOCORRETO, "ERRO: /ir [id do player]");
new id;
if(!IsNumeric(params))
id = ReturnPlayerID(params);
else
id = strval(params);
if(Player[id][BlockIR] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador estб com IR bloqueado!");
if(Player[playerid][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo estб logado para utilizar este comando!");
if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && Player[id][gSpectateID] != INVALID_PLAYER_ID)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Jogador escolhido estб de /olhar em alguйm.");
if(Player[playerid][pPresoADM] == 1 || Player[playerid][pPresoSF] == 1 || Player[playerid][pPresoLV] == 1 || Player[playerid][pPresoLS] == 1 || Player[playerid][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб preso!");
if(GetPlayerInterior(id) > 0)
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COR_ERRO, "ERRO: O player que vocк quer ir estб em um interior, e vocк estб em um veнculo, nгo se pode trazer veнculos а interiores.");
if(Player[id][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este admin estб na cidade dos administradores.");
if(Player[id][EmFesta] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este Player estб no Barra Music/Via Show. Vocк nгo pode Entrar sem Pagar sem Ingreso.");
if(Player[id][pPresoADM] == 1 || Player[id][pPresoSF] == 1 || Player[id][pPresoLV] == 1 || Player[id][pPresoLS] == 1)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este player estб preso.");
if(Player[playerid][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Saia da City Admin primeiro!");
if(Player[playerid][EmFesta] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Saia do Barra Music/Via SHow Pimeiro!");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: ID invбlido.");
new Floatlocx,Floatlocy,Floatlocz;
GetPlayerPos(id, plocx, plocy, plocz);
new intid = GetPlayerInterior(id);
SetPlayerInterior(playerid,intid);
new world = GetPlayerVirtualWorld(id);
SetPlayerVirtualWorld(playerid, world);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
new string[128];
format(string, 128, "{FFFFFF}.::. {FF0000}%s foi atй %s.", getPName(playerid), getPName(id));
MensagemLocal(playerid, COR_ROXO, string, 60);
format(string, 128, "{FFFFFF}.::. {FF0000}%s veio atй %s.", getPName(playerid), getPName(id));
MensagemLocal(id, COR_ROXO, string, 60);
} else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
--------------------------------------------------------------------------------------------------------------------------------
TRAZER - PWN =
-------------
dcmd_trazer(playerid, params[])
{
new tmp[256], idx;
tmp = strtok(params, idx);
new id;
if(!IsNumeric(tmp))
id = ReturnPlayerID(tmp);
else
id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid, COR_ERRO, "ERRO: /Trazer |id|");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador nгo estб conectado.");
if(Player[id][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Esse jogador nгo estб logado!");
if(Player[id][BlockTR] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador estб com TR bloqueado!");
if(Player[id][pPresoADM] == 1 || Player[id][pPresoSF] == 1 || Player[id][pPresoLV] == 1 || Player[id][pPresoLS] == 1 || Player[id][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode puxar este player!");
if(Player[playerid][pPresoADM] == 1 || Player[playerid][pPresoSF] == 1 || Player[playerid][pPresoLV] == 1 || Player[playerid][pPresoLS] == 1 || Player[playerid][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб preso!");
if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && Player[id][gSpectateID] != INVALID_PLAYER_ID)
return SendClientMessage(playerid, COR_ERRO, "SERVER: Erro: Jogador escolhido estб de /olhar em alguйm.");
if(Player[id][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este admin estб na cidade dos administradores.");
if(GetPlayerInterior(playerid) > 0)
if(IsPlayerInAnyVehicle(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: O player que vocк quer puxar estб em um veнculo, nгo se pode trazer veнculos а interiores.");
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 1 || Player[playerid][pReporterLS] >= 1 || Player[playerid][pCORE] >= 6 || Player[playerid][pBOPE] >= 6 || Player[playerid][pEXC] >= 6 || Player[playerid][pPMRJ] >= 6 || Player[playerid][pFrente] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pDM] < 1 || Player[playerid][pLider] < 1 || Player[playerid][pFEDERAL] >= 6)
{
new str[128];
format(str, sizeof(str), "{9090ee}## %s foi puxado por %s.", getPName(playerid), getPName(id));
MensagemLocal(playerid, COR_ROXO, str, 50);
format(str, sizeof(str), "{9090ee}## %s puxou %s.", getPName(playerid), getPName(id));
MensagemLocal(id, COR_ROXO, str, 50);
new Floatlocx,Floatlocy,Floatlocz;
GetPlayerPos(playerid, plocx, plocy, plocz);
new intid = GetPlayerInterior(playerid);
SetPlayerInterior(id,intid);
new world = GetPlayerVirtualWorld(playerid);
SetPlayerVirtualWorld(id, world);
if (GetPlayerState(id) == 2)
{
new tmpcar = GetPlayerVehicleID(id);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(id,plocx,plocy+2, plocz);
}
}
else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
--------------------------------------------------------------------------------------------------------------------------------
TR - PWN =
-------------
dcmd_tr(playerid, params[])
{
new tmp[256], idx;
tmp = strtok(params, idx);
new id;
if(!IsNumeric(tmp))
id = ReturnPlayerID(tmp);
else
id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid, COR_USOCORRETO, "ERRO: /trazer [id]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador nгo estб conectado.");
if(Player[id][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Esse jogador nгo estб logado!");
if(Player[id][pPresoADM] == 1 || Player[id][pPresoSF] == 1 || Player[id][pPresoLV] == 1 || Player[id][pPresoLS] == 1 || Player[id][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode puxar este player!");
if(Player[playerid][pPresoADM] == 1 || Player[playerid][pPresoSF] == 1 || Player[playerid][pPresoLV] == 1 || Player[playerid][pPresoLS] == 1 || Player[playerid][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб preso!");
if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && Player[id][gSpectateID] != INVALID_PLAYER_ID)
return SendClientMessage(playerid, COR_ERRO, "SERVER: Erro: Jogador escolhido estб de /olhar em alguйm.");
if(Player[id][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este admin estб na cidade dos administradores.");
if(GetPlayerInterior(playerid) > 0)
if(IsPlayerInAnyVehicle(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: O player que vocк quer puxar estб em um veнculo, nгo se pode trazer veнculos а interiores.");
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 1 || Player[playerid][pReporterLS] >= 1 || Player[playerid][pCORE] >= 6 || Player[playerid][pBOPE] >= 6 || Player[playerid][pEXC] >= 6 || Player[playerid][pPMRJ] >= 6 || Player[playerid][pFrente] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pDM] < 1 || Player[playerid][pLider] < 1 || Player[playerid][pFEDERAL] >= 6)
{
new str[128];
format(str, sizeof(str), "{9090ee}## %s foi puxado por %s.", getPName(playerid), getPName(id));
MensagemLocal(playerid, COR_ROXO, str, 50);
format(str, sizeof(str), "{9090ee}## %s puxou %s.", getPName(playerid), getPName(id));
MensagemLocal(id, COR_ROXO, str, 50);
new Floatlocx,Floatlocy,Floatlocz;
GetPlayerPos(playerid, plocx, plocy, plocz);
new intid = GetPlayerInterior(playerid);
SetPlayerInterior(id,intid);
new world = GetPlayerVirtualWorld(playerid);
SetPlayerVirtualWorld(id, world);
if (GetPlayerState(id) == 2)
{
new tmpcar = GetPlayerVehicleID(id);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(id,plocx,plocy+2, plocz);
}
}
else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
dcmd_granat(playerid, params[])
{
#pragma unused params
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pHelper] >= 2 || Player[playerid][pFrente] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pEXC] >= 4 || Player[playerid][pPMRJ] >= 4 || Player[playerid][pBOPE] >= 4 || Player[playerid][pCORE] >= 4)
{
for(new i = 0; i <= HighestID; i++)
if(GetDistanceBetweenPlayers(playerid, i) <= 50)
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)) {
GivePlayerMoney(i, 10000);
SendFormattedMessage(i, COR_INFO, "{FFFFFF}%s {FF0000}deu dinheiro para todos ao redor dele.", getPName(playerid));
}
} else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
--------------------------------------------------------------------------------------------------------------------------------
IR - PWN =
-------------
dcmd_ir(playerid, params[])
{
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 1 || Player[playerid][pMotoTaxi] >= 1 || Player[playerid][pReporterLS] >= 1 || Player[playerid][pCORE] >= 5 || Player[playerid][pBOPE] >= 5 || Player[playerid][pEXC] >= 5 || Player[playerid][pPMRJ] >= 5 || Player[playerid][pFrente] >= 1 || Player[playerid][pHelper] >= 300 || Player[playerid][pGerente] >= 1 || Player[playerid][pDM] < 1 || Player[playerid][pLider] < 1 || Player[playerid][pFEDERAL] >= 4)
{
if(!strlen(params))
return SendClientMessage(playerid, COR_USOCORRETO, "ERRO: /ir [id do player]");
new id;
if(!IsNumeric(params))
id = ReturnPlayerID(params);
else
id = strval(params);
if(Player[id][BlockIR] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador estб com IR bloqueado!");
if(Player[playerid][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo estб logado para utilizar este comando!");
if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && Player[id][gSpectateID] != INVALID_PLAYER_ID)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Jogador escolhido estб de /olhar em alguйm.");
if(Player[playerid][pPresoADM] == 1 || Player[playerid][pPresoSF] == 1 || Player[playerid][pPresoLV] == 1 || Player[playerid][pPresoLS] == 1 || Player[playerid][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб preso!");
if(GetPlayerInterior(id) > 0)
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COR_ERRO, "ERRO: O player que vocк quer ir estб em um interior, e vocк estб em um veнculo, nгo se pode trazer veнculos а interiores.");
if(Player[id][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este admin estб na cidade dos administradores.");
if(Player[id][EmFesta] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este Player estб no Barra Music/Via Show. Vocк nгo pode Entrar sem Pagar sem Ingreso.");
if(Player[id][pPresoADM] == 1 || Player[id][pPresoSF] == 1 || Player[id][pPresoLV] == 1 || Player[id][pPresoLS] == 1)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este player estб preso.");
if(Player[playerid][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Saia da City Admin primeiro!");
if(Player[playerid][EmFesta] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Saia do Barra Music/Via SHow Pimeiro!");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: ID invбlido.");
new Floatlocx,Floatlocy,Floatlocz;
GetPlayerPos(id, plocx, plocy, plocz);
new intid = GetPlayerInterior(id);
SetPlayerInterior(playerid,intid);
new world = GetPlayerVirtualWorld(id);
SetPlayerVirtualWorld(playerid, world);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
new string[128];
format(string, 128, "{FFFFFF}.::. {FF0000}%s foi atй %s.", getPName(playerid), getPName(id));
MensagemLocal(playerid, COR_ROXO, string, 60);
format(string, 128, "{FFFFFF}.::. {FF0000}%s veio atй %s.", getPName(playerid), getPName(id));
MensagemLocal(id, COR_ROXO, string, 60);
} else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
--------------------------------------------------------------------------------------------------------------------------------
TRAZER - PWN =
-------------
dcmd_trazer(playerid, params[])
{
new tmp[256], idx;
tmp = strtok(params, idx);
new id;
if(!IsNumeric(tmp))
id = ReturnPlayerID(tmp);
else
id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid, COR_ERRO, "ERRO: /Trazer |id|");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador nгo estб conectado.");
if(Player[id][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Esse jogador nгo estб logado!");
if(Player[id][BlockTR] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador estб com TR bloqueado!");
if(Player[id][pPresoADM] == 1 || Player[id][pPresoSF] == 1 || Player[id][pPresoLV] == 1 || Player[id][pPresoLS] == 1 || Player[id][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode puxar este player!");
if(Player[playerid][pPresoADM] == 1 || Player[playerid][pPresoSF] == 1 || Player[playerid][pPresoLV] == 1 || Player[playerid][pPresoLS] == 1 || Player[playerid][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб preso!");
if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && Player[id][gSpectateID] != INVALID_PLAYER_ID)
return SendClientMessage(playerid, COR_ERRO, "SERVER: Erro: Jogador escolhido estб de /olhar em alguйm.");
if(Player[id][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este admin estб na cidade dos administradores.");
if(GetPlayerInterior(playerid) > 0)
if(IsPlayerInAnyVehicle(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: O player que vocк quer puxar estб em um veнculo, nгo se pode trazer veнculos а interiores.");
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 1 || Player[playerid][pReporterLS] >= 1 || Player[playerid][pCORE] >= 6 || Player[playerid][pBOPE] >= 6 || Player[playerid][pEXC] >= 6 || Player[playerid][pPMRJ] >= 6 || Player[playerid][pFrente] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pDM] < 1 || Player[playerid][pLider] < 1 || Player[playerid][pFEDERAL] >= 6)
{
new str[128];
format(str, sizeof(str), "{9090ee}## %s foi puxado por %s.", getPName(playerid), getPName(id));
MensagemLocal(playerid, COR_ROXO, str, 50);
format(str, sizeof(str), "{9090ee}## %s puxou %s.", getPName(playerid), getPName(id));
MensagemLocal(id, COR_ROXO, str, 50);
new Floatlocx,Floatlocy,Floatlocz;
GetPlayerPos(playerid, plocx, plocy, plocz);
new intid = GetPlayerInterior(playerid);
SetPlayerInterior(id,intid);
new world = GetPlayerVirtualWorld(playerid);
SetPlayerVirtualWorld(id, world);
if (GetPlayerState(id) == 2)
{
new tmpcar = GetPlayerVehicleID(id);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(id,plocx,plocy+2, plocz);
}
}
else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
--------------------------------------------------------------------------------------------------------------------------------
TR - PWN =
-------------
dcmd_tr(playerid, params[])
{
new tmp[256], idx;
tmp = strtok(params, idx);
new id;
if(!IsNumeric(tmp))
id = ReturnPlayerID(tmp);
else
id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid, COR_USOCORRETO, "ERRO: /trazer [id]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador nгo estб conectado.");
if(Player[id][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Esse jogador nгo estб logado!");
if(Player[id][pPresoADM] == 1 || Player[id][pPresoSF] == 1 || Player[id][pPresoLV] == 1 || Player[id][pPresoLS] == 1 || Player[id][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode puxar este player!");
if(Player[playerid][pPresoADM] == 1 || Player[playerid][pPresoSF] == 1 || Player[playerid][pPresoLV] == 1 || Player[playerid][pPresoLS] == 1 || Player[playerid][Penitenciaria] == 1 || Player[id][Penitenciaria] == 1 || Player[id][InHospital] == true || Player[playerid][InHospital] == true || Player[id][InDM] == true || Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб preso!");
if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && Player[id][gSpectateID] != INVALID_PLAYER_ID)
return SendClientMessage(playerid, COR_ERRO, "SERVER: Erro: Jogador escolhido estб de /olhar em alguйm.");
if(Player[id][CityAdmin] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Este admin estб na cidade dos administradores.");
if(GetPlayerInterior(playerid) > 0)
if(IsPlayerInAnyVehicle(id))
return SendClientMessage(playerid, COR_ERRO, "ERRO: O player que vocк quer puxar estб em um veнculo, nгo se pode trazer veнculos а interiores.");
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 1 || Player[playerid][pReporterLS] >= 1 || Player[playerid][pCORE] >= 6 || Player[playerid][pBOPE] >= 6 || Player[playerid][pEXC] >= 6 || Player[playerid][pPMRJ] >= 6 || Player[playerid][pFrente] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pDM] < 1 || Player[playerid][pLider] < 1 || Player[playerid][pFEDERAL] >= 6)
{
new str[128];
format(str, sizeof(str), "{9090ee}## %s foi puxado por %s.", getPName(playerid), getPName(id));
MensagemLocal(playerid, COR_ROXO, str, 50);
format(str, sizeof(str), "{9090ee}## %s puxou %s.", getPName(playerid), getPName(id));
MensagemLocal(id, COR_ROXO, str, 50);
new Floatlocx,Floatlocy,Floatlocz;
GetPlayerPos(playerid, plocx, plocy, plocz);
new intid = GetPlayerInterior(playerid);
SetPlayerInterior(id,intid);
new world = GetPlayerVirtualWorld(playerid);
SetPlayerVirtualWorld(id, world);
if (GetPlayerState(id) == 2)
{
new tmpcar = GetPlayerVehicleID(id);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(id,plocx,plocy+2, plocz);
}
}
else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
dcmd_granat(playerid, params[])
{
#pragma unused params
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pHelper] >= 2 || Player[playerid][pFrente] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pEXC] >= 4 || Player[playerid][pPMRJ] >= 4 || Player[playerid][pBOPE] >= 4 || Player[playerid][pCORE] >= 4)
{
for(new i = 0; i <= HighestID; i++)
if(GetDistanceBetweenPlayers(playerid, i) <= 50)
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)) {
GivePlayerMoney(i, 10000);
SendFormattedMessage(i, COR_INFO, "{FFFFFF}%s {FF0000}deu dinheiro para todos ao redor dele.", getPName(playerid));
}
} else SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
return 1;
}