/comprarb Bug!? -
zGuigui2068 - 30.03.2016
O pawn ta travando mas eu n sei como arrumar pq se eu der tab ele vai tirar a ultima chave e vai dar warning
pawn Код:
if(!strcmp(cmdtext, "/plantarb", true))
{
if(bomb1[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 1928.771484,-1785.187012,13.139766))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodido != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe1 = 0;
pdinhe2 = 0;
pdinhe3 = 0;
pdinhe4 = 0;
pdinhe5 = 0;
pdinhe6 = 0;
pdinhe7 = 0;
Bombp = 1;
bomb1[playerid] = 0;
bombe[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
return 1;
}
else if(bomb11[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombpp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 2232.3899,-1162.6554,25.8906))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodidoo != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe11 = 0;
pdinhe22 = 0;
pdinhe33 = 0;
pdinhe44 = 0;
pdinhe55 = 0;
pdinhe66 = 0;
pdinhe77 = 0;
Bombpp = 1;
bomb11[playerid] = 0;
bombee[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
return 1;
}
Re: /comprarb "vocк nгo esta no local" -
F1N4L - 30.03.2016
Tenta
IsPlayerInRangeOfPoint
Re: /comprarb Bug!? -
zGuigui2068 - 30.03.2016
FINAL OLHA o novo cod que eu coloquei ai em cima
Re: /comprarb Bug!? -
F1N4L - 30.03.2016
Quote:
Originally Posted by zGuigui2068
FINAL OLHA o novo cod que eu coloquei ai em cima
|
Vocк adicionou uma chave a mais
PHP код:
if(!strcmp(cmdtext, "/plantarb", true))
{
if(bomb1[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 1928.771484,-1785.187012,13.139766))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodido != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe1 = 0;
pdinhe2 = 0;
pdinhe3 = 0;
pdinhe4 = 0;
pdinhe5 = 0;
pdinhe6 = 0;
pdinhe7 = 0;
Bombp = 1;
bomb1[playerid] = 0;
bombe[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
else if(bomb11[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombpp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 2232.3899,-1162.6554,25.8906))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodidoo != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe11 = 0;
pdinhe22 = 0;
pdinhe33 = 0;
pdinhe44 = 0;
pdinhe55 = 0;
pdinhe66 = 0;
pdinhe77 = 0;
Bombpp = 1;
bomb11[playerid] = 0;
bombee[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
return 1;
}
Tenta...
Re: /comprarb Bug!? -
zGuigui2068 - 30.03.2016
Editado vou testar
Re: /comprarb Bug!? -
zGuigui2068 - 30.03.2016
pawn Код:
if(!strcmp(cmdtext, "/pdinhe1", true))
{
if(!PlayerToPoint(1.0 ,playerid, 1932.0181,-1783.9647,13.3828))
{
return 1;
}
if(pdinhe1 != 0)
{
return 1;
}
GranaRockstar(playerid, 50000);
DestroyObject(dinhe1);
pdinhe1 = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pegou dinheiro no chгo.");
return 1;
}
else if(!strcmp(cmdtext, "/pdinhe1", true))
{
if(!PlayerToPoint(1.0 ,playerid, 2228.2974,-1159.6223,25.7885))
{
return 1;
}
if(pdinhe11 != 0)
{
return 1;
}
GranaRockstar(playerid, 50000);
DestroyObject(dinhe11);
pdinhe11 = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pegou dinheiro no chгo.");
return 1;
}
Como eu faria isso ?
tipo pq o cmd pra pegar o dinheiro do chao й esse pedinhe1 e sгo varios ai vc me falando eu ja arrumo aq
vlw mesmo ja por tar ajudando
Re: /comprarb Bug!? -
F1N4L - 30.03.2016
Vc estб comparando comandos, vc irб usar um comando por vez entгo nгo use
else if
PHP код:
if(!strcmp(cmdtext, "/pdinhe1", true))
{
if(PlayerToPoint(1.0 ,playerid, 1932.0181,-1783.9647,13.3828) && pdinhe1 != 0)
{
GranaRockstar(playerid, 50000);
DestroyObject(dinhe1);
pdinhe1 = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pegou dinheiro no chгo.");
return 1;
}
else return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк nгo estб prуximo da бrea.");
return 1;
}
if(!strcmp(cmdtext, "/pdinhe1", true))
{
if(PlayerToPoint(1.0 ,playerid, 2228.2974,-1159.6223,25.7885))
{
GranaRockstar(playerid, 50000);
DestroyObject(dinhe11);
pdinhe11 = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pegou dinheiro no chгo.");
return 1;
}
else return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк nгo estб prуximo da бrea.");
return 1;
}
ou
PHP код:
if(!strcmp(cmdtext, "/pdinhe", true))
{
if(PlayerToPoint(1.0 ,playerid, 1932.0181,-1783.9647,13.3828) && pdinhe1 != 0)
{
GranaRockstar(playerid, 50000);
DestroyObject(dinhe1);
pdinhe1 = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pegou dinheiro no chгo.");
return 1;
}
else if(PlayerToPoint(1.0 ,playerid, 2228.2974,-1159.6223,25.7885) && pdinhe11 != 0)
{
GranaRockstar(playerid, 50000);
DestroyObject(dinhe11);
pdinhe11 = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pegou dinheiro no chгo.");
return 1;
}
else return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк nгo estб prуximo da бrea.");
return 1;
}
Re: /comprarb Bug!? -
zGuigui2068 - 30.03.2016
Bugo meu comentario
Re: /comprarb Bug!? -
zGuigui2068 - 30.03.2016
Mano me ajuda compilei aq deu esses 2 erros:
pawn Код:
if(!strcmp(cmdtext, "/explodirb", true))
{
if(bombe[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo plantou uma bomba!");
return 1;
}
if(!PlayerToPoint(60.0 ,playerid, 1928.771484,-1785.187012,13.139766))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
GameTextForPlayer(playerid,"~r~Bomba explodida",5000, 5);
Bombp = 0;
DestroyObject(caixa1);
bombe[playerid] = 0;
Iniciarbomba();
concertar2();
SendClientMessageToAll(-1, "[Camera de seguranзa]um Caixa eletronico foi explodido em LS.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк Explodiu um caixa eletronico,pegue o dinheiro do chгo apertando enter!.");
SetTimer("concertar", 300000, false);
return 1;
if(bombee[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo plantou uma bomba!");
return 1;
}
if(!PlayerToPoint(60.0 ,playerid, 2232.3901,-1162.6427,25.8906))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
GameTextForPlayer(playerid,"~r~Bomba explodida",5000, 5);
Bombpp = 0;
DestroyObject(caixa11);
bombee[playerid] = 0;
Iniciarbombaa();
concertar22();
SendClientMessageToAll(-1, "[Camera de seguranзa]um Caixa eletronico foi explodido em LS.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк Explodiu um caixa eletronico,pegue o dinheiro do chгo apertando enter!.");
SetTimer("concertarr", 300000, false);
return 1;
}
pawn Код:
if(!strcmp(cmdtext, "/plantarb", true))
{
if(bomb1[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 1928.771484,-1785.187012,13.139766))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodido != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe1 = 0;
pdinhe2 = 0;
pdinhe3 = 0;
pdinhe4 = 0;
pdinhe5 = 0;
pdinhe6 = 0;
pdinhe7 = 0;
Bombp = 1;
bomb11[playerid] = 0;
bomb1[playerid] = 0;
bombe[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
else if(bomb11[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombpp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 2232.3899,-1162.6554,25.8906))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodidoo != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe11 = 0;
pdinhe22 = 0;
pdinhe33 = 0;
pdinhe44 = 0;
pdinhe55 = 0;
pdinhe66 = 0;
pdinhe77 = 0;
Bombpp = 1;
bomb1[playerid] = 0;
bomb11[playerid] = 0;
bombee[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
return 1;
}
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(21462) : error 029: invalid expression, assumed zero
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(21462) : warning 215: expression has no effect
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(21462) : error 001: expected token: ";", but found "if"
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(21751) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: /comprarb Bug!? -
F1N4L - 30.03.2016
Sу pra avisar, o comando pode n funcionar corretamente, vc precisa adapta-lo melhor:
PHP код:
if(!strcmp(cmdtext, "/plantarb", true))
{
if(bomb1[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 1928.771484,-1785.187012,13.139766))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodido != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe1 = 0;
pdinhe2 = 0;
pdinhe3 = 0;
pdinhe4 = 0;
pdinhe5 = 0;
pdinhe6 = 0;
pdinhe7 = 0;
Bombp = 1;
bomb11[playerid] = 0;
bomb1[playerid] = 0;
bombe[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
if(bomb11[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Bomba!");
return 1;
}
if(Bombpp != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Alguem ja plantou uma bomba aqui.");
return 1;
}
if(!PlayerToPoint(2.0 ,playerid, 2232.3899,-1162.6554,25.8906))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк Nгo esta no caixa eletronico.");
return 1;
}
if(Explodidoo != 0)
{
SendClientMessage(playerid, COLOR_GREY, "o caixa elкtronico foi explodido, espere quando ele estiver pronto!.");
return 1;
}
pdinhe11 = 0;
pdinhe22 = 0;
pdinhe33 = 0;
pdinhe44 = 0;
pdinhe55 = 0;
pdinhe66 = 0;
pdinhe77 = 0;
Bombpp = 1;
bomb1[playerid] = 0;
bomb11[playerid] = 0;
bombee[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк plantou uma Bomba no caixa Digite /explodirb.");
GameTextForPlayer(playerid,"~r~Bomba plantada",5000, 5);
return 1;
}