SA-MP Forums Archive
[Ajuda]Portгo - 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]Portгo (/showthread.php?tid=324517)



[Ajuda]Portгo - Yuri_xD - 09.03.2012

meu portao ele abre e nгo fecha como posso fazer ele fechar aqui o comando

Quote:

if(strcmp(cmd, "/portaoteste", true) == 0 || strcmp(cmd, "/pteste", true) == 0)
{
if ((IsATeste(playerid)) && PlayerToPoint(15.0, playerid, 2184.7998046875,-1766.599609375,15.10000038147))
{ //PortaoAdmin
MoveObject( PortaoTeste, 2185.1999511719,-1765.9000244141,20.10000038147,3,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~w~Portao ~y~Teste ~n~~b~Aberto", 5000, 3);
SetTimer("PortaoTeste2", 5000, false);
}
return true;
}




Re: [Duvida]Portгo - KinX - 09.03.2012

Se vc for fazer com comando, vc cria 1 comando, e coloca pra mover o objeto para sua posiзгo atual

Mas acho q vc qer q quando ele abre , dps de 1 tempo ele fecha, certo?


Re: [Duvida]Portгo - Yuri_xD - 09.03.2012

sim cara


Re: [Duvida]Portгo - KinX - 09.03.2012

Tente isso

Quote:

if(strcmp(cmd, "/portaoteste", true) == 0 || strcmp(cmd, "/pteste", true) == 0)
{
if ((IsATeste(playerid)) && PlayerToPoint(15.0, playerid, 2184.7998046875,-1766.599609375,15.10000038147))
{ //PortaoAdmin
MoveObject( PortaoTeste, 2185.1999511719,-1765.9000244141,20.10000038147,3,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~w~Portao ~y~Teste ~n~~b~Aberto", 5000, 3);
SetTimer("PortaoTeste2", 5000, false);
MoveObject( PortaoTeste, (COLOQUE AKI AS COORDENADAS DE ONDE O PORTAO SE LOCALIZA), 3);
GameTextForPlayer(playerid, "~w~Portao ~y~Teste ~n~~b~Fechado", 5000, 3);
}
return true;
}




Re: [Duvida]Portгo - Yuri_xD - 09.03.2012

cara agora eu busino ele fala portгo teste fechado :/ agora nem abre lol


Re: [Duvida]Portгo - KinX - 09.03.2012

AA, droga, tenta fazer o Seguinte
Mantem essa parte.

Quote:

if(strcmp(cmd, "/portaoteste", true) == 0 || strcmp(cmd, "/pteste", true) == 0)
{
if ((IsATeste(playerid)) && PlayerToPoint(15.0, playerid, 2184.7998046875,-1766.599609375,15.10000038147))
{ //PortaoAdmin
MoveObject( PortaoTeste, 2185.1999511719,-1765.9000244141,20.10000038147,3,0.0,0.0,0.0);
GameTextForPlayer(playerid, "~w~Portao ~y~Teste ~n~~b~Aberto", 5000, 3);
SetTimer("PortaoTeste2", 5000, false);
}
return true;
}

ai vc coloca isso no final do GM

Quote:

public PortaoTeste2(); //para poder criar a public
{
MoveObject(PortaoTeste, (COORDENADA DO PORTAO), 3); //3 й a velocidade, e aki sao as coordenadas pra fechar a porta
return 1; //retorna verdadeiro e termina
}




Re: [Duvida]Portгo - Yuri_xD - 09.03.2012

nгo foi tambem :/


Re: [Duvida]Portгo - KinX - 09.03.2012

Quote:

public PortaoTeste();
{
MoveObject( PortaoTeste, (COORDENADA DO PORTAO), 3);
return 1;
}

Tente assim, com o portao 1 , se n der eu vou tentar fazer o codigo completo.


Re: [Duvida]Portгo - Yuri_xD - 09.03.2012

deu fail cara :/ aparece que da erro num negocio la


Re: [Duvida]Portгo - Yuri_xD - 09.03.2012

nem da cara fala que apareceu um erro la esse aqui ooo


Quote:

C:\Users\Yuri\Desktop\Mega Life 3.1\gamemodes\MegaLife.pwn(1366) : error 001: expected token: ";", but found "new"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.