10.03.2010, 13:55
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.
Obrigado

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

