[Ajuda] Comando /plantar - 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] Comando /plantar (
/showthread.php?tid=637639)
Comando /plantar -
DogMal - 18.07.2017
Bom criei esse CMD aqui e queria que ele funcionasse so na fazenda criei a vбriavel TaFazenda, mas mesmo assim ele nгo funciona, queria que o CMD funcionasse somente dentro da fazenda alguйm pode em ajudar ?
Quote:
CMD : plantar(playerid)
{
if( TaFazenda[ playerid ] ) return SendClientMessage(playerid, vermelho, "| ERRO | Vocк nгo estб na fazenda");
new Float : pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
CreateObject(644, pos[0]+1.0, pos[1]+1.0, pos[2]-0.7, 0.0, 0.0, 0.0);
SendClientMessage(playerid, -1,"{00FF11}| PLANTANDO | {FFFFFF}Vocк plantou uma {00FF11}бrvore{FFFFFF} e ganhou R$100,00 Pela colheita");
GivePlayerMoney(playerid, 100);
return 1;
}
|
Re: Comando /plantar -
JoaoBorges - 18.07.2017
Mande essa vбriavel 'TaFazenda'
Re: Comando /plantar -
JoaoBorges - 18.07.2017
Код:
CMD:plantar(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -142.8505, 142.2238, 3.8883))
{
CreateObject(644, -142.8505, 142.2238, 3.8883, 0.0, 0.0, 0.0);
SendClientMessage(playerid, -1,"{00FF11}| PLANTANDO | {FFFFFF}Vocк plantou uma {00FF11}бrvore{FFFFFF} e ganhou R$100,00 Pela colheita");
GivePlayerMoney(playerid, 100);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Vocк nгo estб na fazenda");
}
return 1;
}
Re: Comando /plantar -
DogMal - 18.07.2017
TaFazenda[MAX_PLAYERS]
Re: Comando /plantar -
GuilhermeNunes - 18.07.2017
Dк uma estudada nesse FS
https://sampforum.blast.hk/showthread.php?tid=634770
Re: Comando /plantar -
GuilhermeNunes - 18.07.2017
Recomendo new bool:tanafazenda = true);
coloque TRUE pra quando tiver na fazenda e FALSE pra quando tiver Fora e claro coloque no onplayerdeaht false pra quando ele morrer mudar pra false no caso FORA*
Re: Comando /plantar -
JoaoBorges - 18.07.2017
Recomendo criar 'Checkpoints' e usar os IsPlayerInRangeOfPoint como eu fiz ali em cima!
Re: Comando /plantar -
IlanZ - 18.07.2017
IsPlayerInRangeOfPoint
Re: Comando /plantar -
DogMal - 19.07.2017
Obrigado JaoaoBorges, IlanZ e GuilhermeNunes me ajudaram muito !!