SA-MP Forums Archive
[Ajuda] Pedagio - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Pedagio (/showthread.php?tid=303129)



[Ajuda] Pedagio - Geo1996 - 11.12.2011

Bom, Criei Um Sistema de Pedagio So Que Ele Nгo Desconta Dinheiro

Код:
forward peda();

SetTimer("peda", 1000, 1);


public peda()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerInRangeOfPoint(i, 7.0, 65.922424316406, -1541.4698486328,4.5561060905457))
{
new string[50];
format(string, sizeof(string), "~g~Pedagio ~r~Pago: ~b~$200");
GameTextForPlayer(i, string, 3000, 4);
GivePlayerMoney(i, - 200);
}
}
return 1;
}
Alguem Ai Poderia Me Ajudar Com Este Sistema?


Re: [Ajuda] Pedagio - Mattos - 11.12.2011

Esse set timer ta voando no meio do nada? ou ta em uma public?

@OFF

E seja bem vindo ao Forum SAMP


Re: [Ajuda] Pedagio - Geo1996 - 11.12.2011

esta junto a public


Re: [Ajuda] Pedagio - Mattos - 11.12.2011

no cуdigo da forma que vc postou nao ta dentro de nenhuma public... por isso que a funзгo nao estб sendo realizada por ela nao esta sendo chamada...


Re: [Ajuda] Pedagio - Kuddy - 11.12.2011

Acho que -200 e - 200 sгo valores diferentes

Tente: GivePlayerMoney(i, -200);


Re: [Ajuda] Pedagio - Geo1996 - 11.12.2011

magnus ja tentei isso e nao resolveu nada ele ate desconta dinheiro mas depois volta ao normal


Re: [Ajuda] Pedagio - tuner - 11.12.2011

Pode ser do anti-money hack...


Re: [Ajuda] Pedagio - Geo1996 - 11.12.2011

a agora sakei por ela dentro da public vou tentar se der certo avizo


Re: [Ajuda] Pedagio - Bolinha_ProJogos - 11.12.2011

que posiзгo й essa ?

PHP код:
if(IsPlayerInRangeOfPoint(i7.065.922424316406, -1541.4698486328,4.5561060905457))
cruzes
65.922424316406
, -1541.4698486328,4.5561060905457
      x              y               z 
Seria melhor vocк ir e da /save no local e pegar a posiзгo x,y,z e colocar ai do que usar a posiзгo de um objeto!

tenta ae


PHP код:
//topo do gamemode
forward peda();
//public OnGameModeInit
SetTimer("peda"10001);
//final do gm
public peda()
{
for(new 
0MAX_PLAYERSi++)
{
if(
IsPlayerInRangeOfPoint(i7.0x,y,z))//troque x,y,z pela posiзгo do local aonde fica o pegadio use /save para pegar!
{
new 
string[50];
format(stringsizeof(string), "~g~Pedagio ~r~Pago: ~b~$200");
GameTextForPlayer(istring30004);
GivePlayerMoney(i, - 200);
}
}
return 
1;




Re: [Ajuda] Pedagio - Geo1996 - 11.12.2011

coloquei a settimer dentro da public e agora nem a text nao aparece