[ajuda]Erro -
Luiiz - 18.04.2012
oq ta errado?
Codigo:
pawn Код:
public RouboBanco(playerid) {
KillTimer(tempobanco);
if(!PlayerToPoint(8.0,playerid,2144.2131,1641.8859,993.5761)) {
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
ClearAnimations(playerid);
RemovePlayerAttachedObject(playerid,0);
return 1;
}
new grana = 1000 + random(60000);
if(PlayerToPoint(10.0,playerid,2144.2131,1641.8859,993.5761)) {
new var032=0;
if (PlayerInfo[playerid][pLider] != 0) { var032 = PlayerInfo[playerid][pLider]; }
else if (PlayerInfo[playerid][pMembro] != 0) { var032 = PlayerInfo[playerid][pMembro]; }
if(ProvocoBanco[playerid] == 1) {
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
RemovePlayerAttachedObject(playerid,0);
ClearAnimations(playerid);
}
if (PlayerInfo[playerid][pLider] == var032 || PlayerInfo[playerid][pMembro] == var032)
{
new Float:p[3];
GetPlayerPos(playerid,p[0],p[1],p[2]);
if(!IsPlayerInRangeOfPoint(playerid, 10 , p[0], p[1], p[2]))
SetPlayerCriminal(playerid,255, "Assalto ao Banco");
GivePlayerMoney(playerid, grana);
format(gstring, sizeof(gstring), "Vocк e os %s roubaram $%d do cofre do Banco!",NomeORG(playerid), grana);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
}
}
}
}
}
return 1;
}
Erros:
pawn Код:
(64277) : warning 209: function "RouboBanco" should return a value
(64278) : error 054: unmatched closing brace ("}")
(64280) : error 010: invalid function or declaration
Re: [ajuda]Erro -
mau.tito - 18.04.2012
pawn Код:
public RouboBanco(playerid)
{
KillTimer(tempobanco);
new grana = 1000 + random(60000), Float:p[3];
if(!PlayerToPoint(8.0,playerid,2144.2131,1641.8859,993.5761))
{
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
ClearAnimations(playerid);
RemovePlayerAttachedObject(playerid,0);
return 1;
}
if(PlayerToPoint(10.0,playerid,2144.2131,1641.8859,993.5761))
{
new var032=0;
if (PlayerInfo[playerid][pLider] != 0)
{
var032 = PlayerInfo[playerid][pLider];
}
else if (PlayerInfo[playerid][pMembro] != 0)
{
var032 = PlayerInfo[playerid][pMembro];
}
if(ProvocoBanco[playerid] == 1)
{
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
RemovePlayerAttachedObject(playerid,0);
ClearAnimations(playerid);
return 1;
}
if (PlayerInfo[playerid][pLider] == var032 || PlayerInfo[playerid][pMembro] == var032)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
if(!IsPlayerInRangeOfPoint(playerid, 10 , p[0], p[1], p[2]))
SetPlayerCriminal(playerid,255, "Assalto ao Banco");
GivePlayerMoney(playerid, grana);
format(gstring, sizeof(gstring), "Vocк e os %s roubaram $%d do cofre do Banco!",NomeORG(playerid), grana);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
return 1;
}
}
return 1;
}
Re: [ajuda]Erro -
Luiiz - 18.04.2012
nem deu certo ;s
Re: [ajuda]Erro -
@Riichard - 18.04.2012
TEntae '-'
pawn Код:
public RouboBanco(playerid) {
KillTimer(tempobanco);
if(!PlayerToPoint(8.0,playerid,2144.2131,1641.8859,993.5761)) {
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
ClearAnimations(playerid);
RemovePlayerAttachedObject(playerid,0);
return 1;
}
new grana = 1000 + random(60000);
if(PlayerToPoint(10.0,playerid,2144.2131,1641.8859,993.5761)) {
new var032=0;
if (PlayerInfo[playerid][pLider] != 0) { var032 = PlayerInfo[playerid][pLider]; }
else if (PlayerInfo[playerid][pMembro] != 0) { var032 = PlayerInfo[playerid][pMembro]; }
if(ProvocoBanco[playerid] == 1) {
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
RemovePlayerAttachedObject(playerid,0);
ClearAnimations(playerid);
}
if (PlayerInfo[playerid][pLider] == var032 || PlayerInfo[playerid][pMembro] == var032)
{
new Float:p[3];
GetPlayerPos(playerid,p[0],p[1],p[2]);
if(!IsPlayerInRangeOfPoint(playerid, 10 , p[0], p[1], p[2]))
SetPlayerCriminal(playerid,255, "Assalto ao Banco");
GivePlayerMoney(playerid, grana);
format(gstring, sizeof(gstring), "Vocк e os %s roubaram $%d do cofre do Banco!",NomeORG(playerid), grana);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
return 0;
}
}
return 1;
}
Re: [ajuda]Erro -
CidadeNovaRP - 18.04.2012
Tenta
:
pawn Код:
#include <a_samp>
forward RouboBanco(playerid);
public RouboBanco(playerid)
{
KillTimer(tempobanco);
if(!PlayerToPoint(8.0,playerid,2144.2131,1641.8859,993.5761))
{
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
ClearAnimations(playerid);
RemovePlayerAttachedObject(playerid,0);
return 1;
}
new grana = 1000 + random(60000);
if(PlayerToPoint(10.0,playerid,2144.2131,1641.8859,993.5761))
{
new var032=0;
if (PlayerInfo[playerid][pLider] != 0)
{
var032 = PlayerInfo[playerid][pLider];
}
else if (PlayerInfo[playerid][pMembro] != 0)
{
var032 = PlayerInfo[playerid][pMembro];
}
if(ProvocoBanco[playerid] == 1)
{
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
RemovePlayerAttachedObject(playerid,0);
ClearAnimations(playerid);
}
if (PlayerInfo[playerid][pLider] == var032 || PlayerInfo[playerid][pMembro] == var032)
{
new Float:p[3];
GetPlayerPos(playerid,p[0],p[1],p[2]);
if(!IsPlayerInRangeOfPoint(playerid, 10 , p[0], p[1], p[2]))
SetPlayerCriminal(playerid,255, "Assalto ao Banco");
GivePlayerMoney(playerid, grana);
format(gstring, sizeof(gstring), "Vocк e os %s roubaram $%d do cofre do Banco!",NomeORG(playerid), grana);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
}
}
return 1;
}
Re: [ajuda]Erro -
Luiiz - 18.04.2012
compilo + so quem ganha a grana do roubo й quem rouba quem esta perto do cofre nao ganha ;s
Re: [ajuda]Erro -
@Riichard - 18.04.2012
Qual compilo?
Meu ou do CidadeNovaRP?
@EDIT
Se foi o meu,tenta :
pawn Код:
public RouboBanco(playerid) {
KillTimer(tempobanco);
if(!PlayerToPoint(8.0,playerid,2144.2131,1641.8859,993.5761)) {
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
ClearAnimations(playerid);
RemovePlayerAttachedObject(playerid,0);
return 1;
}
new grana = 1000 + random(60000);
if(PlayerToPoint(10.0,playerid,2144.2131,1641.8859,993.5761)) {
new var032=0;
if (PlayerInfo[playerid][pLider] != 0) { var032 = PlayerInfo[playerid][pLider]; }
else if (PlayerInfo[playerid][pMembro] != 0) { var032 = PlayerInfo[playerid][pMembro]; }
if(ProvocoBanco[playerid] == 1) {
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
RemovePlayerAttachedObject(playerid,0);
ClearAnimations(playerid);
}
if (PlayerInfo[playerid][pLider] == var032 || PlayerInfo[playerid][pMembro] == var032)
{
new Float:p[3];
GetPlayerPos(playerid,p[0],p[1],p[2]);
if(!IsPlayerInRangeOfPoint(playerid, 10 , p[0], p[1], p[2]))
SetPlayerCriminal(playerid,255, "Assalto ao Banco");
GivePlayerMoney(playerid, grana);
format(gstring, sizeof(gstring), "Vocк e os %s roubaram $%d do cofre do Banco!",NomeORG(playerid), grana);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
return 1;
}
return 1;
}
Re: [ajuda]Erro -
CidadeNovaRP - 18.04.2012
Ta ae
:
pawn Код:
public RouboBanco(playerid)
{
KillTimer(tempobanco);
if(!PlayerToPoint(8.0,playerid,2144.2131,1641.8859,993.5761))
{
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
ClearAnimations(playerid);
RemovePlayerAttachedObject(playerid,0);
return 1;
}
new grana = 1000 + random(60000);
if(PlayerToPoint(10.0,playerid,2144.2131,1641.8859,993.5761))
{
new var032=0;
if (PlayerInfo[playerid][pLider] != 0)
{
var032 = PlayerInfo[playerid][pLider];
}
else if (PlayerInfo[playerid][pMembro] != 0)
{
var032 = PlayerInfo[playerid][pMembro];
}
if(ProvocoBanco[playerid] == 1)
{
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
RemovePlayerAttachedObject(playerid,0);
ClearAnimations(playerid);
}
for(new i=0;i<MAX_PLAYERS;i++)
{
if (PlayerInfo[playerid][pLider] == var032 || PlayerInfo[playerid][pMembro] == var032)
{
new Float:p[3];
GetPlayerPos(i,p[0],p[1],p[2]);
if(!IsPlayerInRangeOfPoint(i, 10 , p[0], p[1], p[2]))
SetPlayerCriminal(i,255, "Assalto ao Banco");
GivePlayerMoney(i, grana);
format(gstring, sizeof(gstring), "Vocк e os %s roubaram $%d do cofre do Banco!",NomeORG(playerid), grana);
SendClientMessage(i, COLOR_YELLOW, gstring);
}
}
}
return 1;
}
Re: [ajuda]Erro -
Luiiz - 18.04.2012
o teu primeiro code tinha compilado richard + n tinha dado certo, o segundo nem compilo eo do cidadevona compilo + ndeu certo tbm ;s
Re: [ajuda]Erro -
Luiiz - 18.04.2012
opa deu certo cidadenova so nao seto o SetPlayerCriminal