quando eu vou emcima do pickup pra roubar o roubo nao inicia -
wainner - 19.07.2018
bom quando eu vou no pickup pra apertar f pra roubar nao vai as cordenadas ta tudo certa mas nгo vai oque pode ser ?
Re: quando eu vou emcima do pickup pra roubar o roubo nao inicia -
Lovejoy - 19.07.2018
Muitas coisas cara, cade o codigo? nao temos bolas de cristais...
Re: quando eu vou emcima do pickup pra roubar o roubo nao inicia -
wainner - 19.07.2018
Код:
//-------------------------------------------------------------------------------------------------------------------
if(newkeys == KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 3.0, 1766.4453,-1713.7134,13.5489)) // Tecla » [ \| ]
{
if(Player[playerid][pEXT] >= 1 || Player[playerid][pBOPE] >= 1 || Player[playerid][pPMRJ] >= 1)return SendClientMessage(playerid, COR_ERRO, "ERRO: Policial nгo rouba banco ;)");
if(Player[playerid][pTempoBanco] >= 1)
{
SendFormattedMessage(playerid, COR_ERRO, "ERRO: Vocк jб roubou o banco recentemente, espere %s.", Convert(Player[playerid][pTempoBanco]));
return 1;
}
static Ladrao[MAX_PLAYER_NAME], sStr[70];
new Float:Pos[3];
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
Player[playerid][pProcurado] += 1;
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
if(Roubando[playerid] == 1) return SendClientMessage(playerid, 0xE31919FF, "[~] Vocк jб estб assaltando!");
format(sStr, sizeof(sStr), "[NOTНCIAS] %s[%d] Plantou uma Bomba no Caixa Eletrуnico!", Ladrao, playerid);
SendClientMessageToAll(0xE31919FF, sStr);
Bomba = CreateObject(1252, Pos[0], Pos[1], Pos[2] - 0.8,270,0,0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetPlayerAttachedObject(playerid, 3, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
format(sStr, sizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!", TempoRoubo);
SendClientMessage(playerid, 0xC9C9C9FF, sStr);
SendClientMessage(playerid, 0xFF7777AA, "Vocк foi feito um procurado da justiзa. | Crime: 157.");
SetTimerEx("Roubou", 60000*TempoRoubo,false,"d", playerid);
Roubando[playerid] = 1;
new city[64] = "Nгo identificado";
new string[100];
switch(GetPlayerCity(playerid))
{
case CITY_LS: city = "Los Santos";
case CITY_SF: city = "San Fierro";
case CITY_LV: city = "Las Venturas";
}
format(string,sizeof(string),"HQ{FFFFFF}: Chamando Todas As Ъnidades, Denъncia de {4876FF}Banco.");
SendMessageToCops(0xFF0000AA, string);
format(string,sizeof(string),"HQ{FFFFFF}: Crime: 157 | Suspeito: %s | Local: %s !", getPName(playerid), city);
SendMessageToCops(0xFF0000AA, string);
SalvarPlayer(playerid);
return 1;
}
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(PlayerToPoint(1.0, playerid, 2927.863769,-1785.710815,1191.065673))
{
ShowPlayerDialog(playerid, 18, DIALOG_STYLE_LIST, "BANCO", "Saldo\nDepositar\nSacar", "Ok", "Cancelar");
}
}
Код:
//==============================================================================//
public Robbank(playerid)
{
new string[256];
new sendername[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string), "-Informaзгo-: ** %s Roubou O Banco do Brasil **.", sendername);
SendClientMessageToAll(Vermelho,string);
format(string,sizeof(string), "** Vocк Roubou %d Reais do Banco **",robmoney[playerid]);
SendClientMessage(playerid, COR_INFO,string);
KillTimer(Kils);
GivePlayerMoney(playerid, robmoney[playerid]);
Roubando[playerid] = 0;
return 1;
}
Код:
//==============================================================================//
public Roubou(playerid)
{
if(Roubando[playerid] == 0) return SendClientMessage(playerid, 0xC9C9C9FF, "Vocк nгo consiguiu roubar pois saiu do local ou morreu.");
static Ladrao[MAX_PLAYER_NAME], sStr[100];
GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
GivePlayerMoney(playerid, 500000);
DestroyObject(Bomba);
CreateExplosion(1766.4453,-1713.7134,13.5489, 10, 15); // Ira criar uma explosгo exatamente no lugar que o player digitou para roubar
format(sStr, sizeof(sStr), "[NOTНCIAS] A Polнcia demorou e %s[%d] conseguiu explodir o Caixa Eletrуnico!", Ladrao, playerid);
SendClientMessageToAll(0xE31919FF, sStr);
Roubando[playerid] = 0;
Player[playerid][pTempoBanco] = 120;
DestroyObject(Bomba);
return 1;
}
Re: quando eu vou emcima do pickup pra roubar o roubo nao inicia -
Lovejoy - 19.07.2018
Topo da GM:
PHP код:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_SECONDARY_ATTACK))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1766.4453, -1713.7134, 13.5489))
{
if(Player[playerid][pEXT] >= 1 || Player[playerid][pBOPE] >= 1 || Player[playerid][pPMRJ] >= 1)return SendClientMessage(playerid, COR_ERRO, "ERRO: Policial nгo rouba banco ;)");
if(Player[playerid][pTempoBanco] >= 1)
{
SendFormattedMessage(playerid, COR_ERRO, "ERRO: Vocк jб roubou o banco recentemente, espere %s.", Convert(Player[playerid][pTempoBanco]));
return 1;
}
static Ladrao[MAX_PLAYER_NAME], sStr[70];
new Float:Pos[3];
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
Player[playerid][pProcurado] += 1;
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
if(Roubando[playerid] == 1) return SendClientMessage(playerid, 0xE31919FF, "[~] Vocк jб estб assaltando!");
format(sStr, sizeof(sStr), "[NOTНCIAS] %s[%d] Plantou uma Bomba no Caixa Eletrуnico!", Ladrao, playerid);
SendClientMessageToAll(0xE31919FF, sStr);
Bomba = CreateObject(1252, Pos[0], Pos[1], Pos[2] - 0.8,270,0,0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetPlayerAttachedObject(playerid, 3, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
format(sStr, sizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!", TempoRoubo);
SendClientMessage(playerid, 0xC9C9C9FF, sStr);
SendClientMessage(playerid, 0xFF7777AA, "Vocк foi feito um procurado da justiзa. | Crime: 157.");
SetTimerEx("Roubou", 60000*TempoRoubo,false,"d", playerid);
Roubando[playerid] = 1;
new city[64] = "Nгo identificado";
new string[100];
switch(GetPlayerCity(playerid))
{
case CITY_LS: city = "Los Santos";
case CITY_SF: city = "San Fierro";
case CITY_LV: city = "Las Venturas";
}
format(string,sizeof(string),"HQ{FFFFFF}: Chamando Todas As Ъnidades, Denъncia de {4876FF}Banco.");
SendMessageToCops(0xFF0000AA, string);
format(string,sizeof(string),"HQ{FFFFFF}: Crime: 157 | Suspeito: %s | Local: %s !", getPName(playerid), city);
SendMessageToCops(0xFF0000AA, string);
SalvarPlayer(playerid);
return 1;
}
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(PlayerToPoint(1.0, playerid, 2927.863769,-1785.710815,1191.065673))
{
ShowPlayerDialog(playerid, 18, DIALOG_STYLE_LIST, "BANCO", "Saldo\nDepositar\nSacar", "Ok", "Cancelar");
}
}
ajeita e testa
Re: quando eu vou emcima do pickup pra roubar o roubo nao inicia -
Lovejoy - 19.07.2018
Resolveu amigo?