Entrar e Sair Apertando F
#1

Boas

Nao sei se й possivel no samp, mas tem geito de entrar e sair de uma casa carregando F ou ENTER por exemplo Em vez do comando?
Caso algum saiba se й possivel fazer isto ficaria agradecido
Deixo aqui um exemplo onde gostaria de colocar essa formula.

Код:
#include <a_samp>

forward PlayerToPoint(Float:radi, playerid, Float:xx, Float:yy, Float:zz);

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/AGENCIA", true) == 0)
	{
	if(PlayerToPoint(1.0,playerid,-3099.9595,1004.4452,19.5471))
  {
  SetPlayerInterior(playerid,3);
	SetPlayerPos(playerid,378.2073,173.4705,1008.3828);
	}
	return 1;
	}

	if(strcmp(cmdtext, "/AGENCIA", true) == 0)
	{
	if(PlayerToPoint(1.0,playerid,-3099.9595,1004.4452,19.5471))
  {
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,1462.4030,-1011.6450,26.8437);
	}
	return 1;
	}
	return 0;
}

public PlayerToPoint(Float:radi, playerid, Float:xx, Float:yy, Float:zz)
{
	if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -xx);
		tempposy = (oldposy -yy);
		tempposz = (oldposz -zz);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}
Obrigado
Reply


Messages In This Thread
Entrar e Sair Apertando F - by _COTTA_ - 10.03.2010, 13:55
Re: Entrar e Sair Apertando F - by Chivits - 10.03.2010, 15:06
Re: Entrar e Sair Apertando F - by andmeida10 - 10.03.2010, 15:12
Re: Entrar e Sair Apertando F - by _COTTA_ - 10.03.2010, 15:40
Re: Entrar e Sair Apertando F - by wafffllesss - 10.03.2010, 16:41
Re: Entrar e Sair Apertando F - by andmeida10 - 10.03.2010, 16:43
Re: Entrar e Sair Apertando F - by wafffllesss - 10.03.2010, 16:54
Re: Entrar e Sair Apertando F - by RoamPT - 10.03.2010, 17:27
Re: Entrar e Sair Apertando F - by andmeida10 - 10.03.2010, 18:22
Re: Entrar e Sair Apertando F - by Gabriel6 - 11.03.2010, 00:26

Forum Jump:


Users browsing this thread: 10 Guest(s)