[Ajuda] Assalto A Loterica -
Strok - 05.02.2011
To com um poblema na hora de copilar o sistema de loterica nгo conssigui arrumar e vim aqui ver
se arranjo uma soluзгo
O FS:
pawn Код:
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
new AssaltandoLoterica;
new LotericaAssaltada;
forward AssaltoLoterica(playerid);
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("» Sistema de assalto a loterica ");
print("» [NNF]Skf ");
print("--------------------------------------\n");
LotericaAssaltada = 0;
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new Fonte[256];
if(strcmp(cmdtext, "/assaltarloteria", true) == 0)
{
if(LotericaAssaltada == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "A lotйrica estб com o cofre vazio.");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{
AssaltandoLoterica = playerid;
format(Fonte, sizeof(Fonte), "Atenзгo! A Lotйrica estб sendo assaltada por %s.", JogadorNick(playerid));
SendClientMessageToAll(COLOR_YELLOW, Fonte);
SendClientMessage(playerid, COLOR_YELLOW, "Aguarde perto ao cofre para concluir o assalto.");
SetTimerEx("AssaltoLoterica", 30000, 0, "d", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
return 1;
}
return 1;
}
return 0;
}
public AssaltoLoterica(playerid)
{
if(IsPlayerConnected(playerid) && AssaltandoLoterica != 999)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{
GivePlayerMoney(playerid, 100000);
SendClientMessageToAll(COLOR_YELLOW, "Os COPS falharam, a Lotйrica foi assaltada - Os bandidos levaram um total de $100000.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк recebeu $100000 do assalto б Lotйrica.");
return 1;
}
else
{
SendClientMessageToAll(COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos fugiram.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
return 1;
}
}
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
public LiberarAssaltoLoterica()
{
LotericaAssaltada = 0;
AssaltandoLoterica = 999;
SendClientMessageToAll(COLOR_YELLOW, "A Lotйrica informa que os caixas jб estгo prontos para atender os clientes, o dinheiro do assalto foi recomposto.")
;
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid != 3)
{
SendClientMessageToAll(COLOR_YELLOW, "O Sistema de seguranзa da Lotйrica trancou as portas, os suspeitos estгo fora de alcance do cofre.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason[])
{
if(playerid == AssaltandoLoterica)
{
SendClientMessageToAll( COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos foram detidos.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
return 1;
}
JogadorNick(playerid)
{
new ObterNick[MAX_PLAYER_NAME];
GetPlayerName(playerid, ObterNick, sizeof(ObterNick));
return ObterNick;
}
O erro:
pawn Код:
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(179) : warning 225: unreachable code
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(225) : warning 209: function "AssaltoLoterica" should return a value
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(227) : warning 235: public function lacks forward declaration (symbol "LiberarAssaltoLoterica")
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(261) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Ta ai qm poder me ajudar !! vlw
Re: [Ajuda] Assalto A Loterica -
Lucky ® - 05.02.2011
coloca em [*pawn] [*/pawn] no lugar de queote
Re: [Ajuda] Assalto A Loterica -
Macintosh - 05.02.2011
Tente.
pawn Код:
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
new AssaltandoLoterica;
new LotericaAssaltada;
forward AssaltoLoterica();
forward LiberarAssaltoLoterica();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("» Sistema de assalto a loterica ");
print("» [NNF]Skf ");
print("--------------------------------------\n");
LotericaAssaltada = 0;
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new Fonte[256];
if(strcmp(cmdtext, "/assaltarloteria", true) == 0)
{
if(LotericaAssaltada == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "A lotйrica estб com o cofre vazio.");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{
AssaltandoLoterica = playerid;
format(Fonte, sizeof(Fonte), "Atenзгo! A Lotйrica estб sendo assaltada por %s.", JogadorNick(playerid));
SendClientMessageToAll(COLOR_YELLOW, Fonte);
SendClientMessage(playerid, COLOR_YELLOW, "Aguarde perto ao cofre para concluir o assalto.");
SetTimerEx("AssaltoLoterica", 30000, 0, "d", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
return 1;
}
return 1;
}
return 0;
}
public AssaltoLoterica()
{
if(IsPlayerConnected(playerid) && AssaltandoLoterica != 999)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{
GivePlayerMoney(playerid, 100000);
SendClientMessageToAll(COLOR_YELLOW, "Os COPS falharam, a Lotйrica foi assaltada - Os bandidos levaram um total de $100000.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк recebeu $100000 do assalto б Lotйrica.");
return 1;
}
else
{
SendClientMessageToAll(COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos fugiram.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
return 1;
}
}
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
public LiberarAssaltoLoterica()
{
LotericaAssaltada = 0;
AssaltandoLoterica = 999;
SendClientMessageToAll(COLOR_YELLOW, "A Lotйrica informa que os caixas jб estгo prontos para atender os clientes, o dinheiro do assalto foi recomposto.")
;
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid != 3)
{
SendClientMessageToAll(COLOR_YELLOW, "O Sistema de seguranзa da Lotйrica trancou as portas, os suspeitos estгo fora de alcance do cofre.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason[])
{
if(playerid == AssaltandoLoterica)
{
SendClientMessageToAll( COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos foram detidos.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
return 1;
}
JogadorNick(playerid)
{
new ObterNick[MAX_PLAYER_NAME];
GetPlayerName(playerid, ObterNick, sizeof(ObterNick));
return ObterNick;
}
Re: [Ajuda] Assalto A Loterica -
Strok - 05.02.2011
Fiz isso dai Nicolas deu esses erros!
pawn Код:
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(75) : warning 225: unreachable code
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(86) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(89) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(92) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(96) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(107) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(121) : warning 209: function "AssaltoLoterica" should return a value
C:\Documents and Settings\Michel\Desktop\Brasil Life Work\filterscripts\loterica.pwn(157) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Re: [Ajuda] Assalto A Loterica -
Macintosh - 05.02.2011
retorne o valor da public AssaltoLoterica
coloque return 1; }
Re: [Ajuda] Assalto A Loterica -
[NWD]Jim._.Carrey - 05.02.2011
Testa:
pawn Код:
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
new AssaltandoLoterica;
new LotericaAssaltada;
forward AssaltoLoterica(playerid);
forward LiberarAssaltoLoterica();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("» Sistema de assalto a loterica ");
print("» [NNF]Skf ");
print("--------------------------------------\n");
LotericaAssaltada = 0;
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new Fonte[256];
if(strcmp(cmdtext, "/assaltarloteria", true) == 0)
{
if(LotericaAssaltada == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "A lotйrica estб com o cofre vazio.");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{
AssaltandoLoterica = playerid;
format(Fonte, sizeof(Fonte), "Atenзгo! A Lotйrica estб sendo assaltada por %s.", JogadorNick(playerid));
SendClientMessageToAll(COLOR_YELLOW, Fonte);
SendClientMessage(playerid, COLOR_YELLOW, "Aguarde perto ao cofre para concluir o assalto.");
SetTimerEx("AssaltoLoterica", 30000, 0, "d", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
return 1;
}
}
return 0;
}
public AssaltoLoterica(playerid)
{
if(IsPlayerConnected(playerid) && AssaltandoLoterica != 999)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{
GivePlayerMoney(playerid, 100000);
SendClientMessageToAll(COLOR_YELLOW, "Os COPS falharam, a Lotйrica foi assaltada - Os bandidos levaram um total de $100000.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк recebeu $100000 do assalto б Lotйrica.");
return 1;
}
else
{
SendClientMessageToAll(COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos fugiram.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
return 1;
}
}
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
return 1;
}
public LiberarAssaltoLoterica()
{
LotericaAssaltada = 0;
AssaltandoLoterica = 999;
SendClientMessageToAll(COLOR_YELLOW, "A Lotйrica informa que os caixas jб estгo prontos para atender os clientes, o dinheiro do assalto foi recomposto.");
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid != 3)
{
SendClientMessageToAll(COLOR_YELLOW, "O Sistema de seguranзa da Lotйrica trancou as portas, os suspeitos estгo fora de alcance do cofre.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid == AssaltandoLoterica)
{
SendClientMessageToAll(COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos foram detidos.");
SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");
LotericaAssaltada = 1;
AssaltandoLoterica = 999;
SetTimer("LiberarAssaltoLoterica", 90000, 0);
}
return 1;
}
JogadorNick(playerid)
{
new ObterNick[MAX_PLAYER_NAME];
GetPlayerName(playerid, ObterNick, sizeof(ObterNick));
return ObterNick;
}
Re: [Ajuda] Assalto A Loterica -
Strok - 05.02.2011
Ae deu certo Vlw ae /\ agora vo testar in game pra ver se roda de boa... se n rodar eu edito vlw ae !
Re: [Ajuda] Assalto A Loterica -
EoProzinhO - 05.02.2011
eu fiz fico assim
pawn Код:
C:\Documents and Settings\Lucas\Desktop\Untitled.pwn(84) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Lucas\Desktop\Untitled.pwn(84) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Lucas\Desktop\Untitled.pwn(84) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas\Desktop\Untitled.pwn(84) : fatal error 107: too many error messages on one line
Re: [Ajuda] Assalto A Loterica -
[NWD]Jim._.Carrey - 05.02.2011
'-' й que fail a carinha era para ser =)
Sу que pressionei o Shift junto ._. FikDik @#%$#
Re: [Ajuda] Assalto A Loterica -
Macintosh - 05.02.2011
Vou fazer e dizer que entendi.
LOL Estas bebado D: