SA-MP Forums Archive
[Pedido] Funзгo ou codigo. - 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: [Pedido] Funзгo ou codigo. (/showthread.php?tid=631692)



Funзгo ou codigo. - PetrickSchobaPS - 03.04.2017

Pessoal a uns anos atrбs eu vi uma funзгo na wiki qual eu nгo sei o nome, ela consegue verificar a бrea que o jogador esta em retangular .

Por acaso se alguйm saber qual й o nome da funзгo ou outra funзгo que consiga verificar se o player esta em Los Santos, San Fierro, Las Venturas, Tierra Roubada...


Re: Funзгo ou codigo. - IlanZ - 03.04.2017

Achei essas funзхes em umas gm ae

PHP код:
static stock IsPlayerInLosSantos(playerid)
{
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playeridxyz);
    if(
>= 44.60 && >= -2892.90 && <= 2997.00 && <= -768.00) return 1;
    else return 
0;
}

static 
stock IsPlayerInLasVenturas(playerid)
{
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playeridxyz);
    if(
>= 869.40 && >= 596.30 && <= 2997.00 && <= 2993.80) return 1;
    else return 
0;
}

static 
stock IsPlayerInArea(playeridFloat:max_xFloat:min_xFloat:max_yFloat:min_y)
{
    new 
Float:XFloat:YFloat:Z;
    
GetPlayerPos(playeridXYZ);
    if(
<= max_x && >= min_x && <= max_y && >= min_y) return true;
    return 
0;




Re: Funзгo ou codigo. - ViniBorn - 03.04.2017

https://sampforum.blast.hk/showthread.php?tid=166545


Re: Funзгo ou codigo. - ClaudioF - 03.04.2017

Cуdigo, й o mesmo que й usado para criar uma Gangzone, Exemplo do IlanZ.


Re: Funзгo ou codigo. - DarkBr - 03.04.2017

Quote:
Originally Posted by ViniBorn
Посмотреть сообщение
Quote:
Originally Posted by IlanZ
Посмотреть сообщение
Achei essas funзхes em umas gm ae

PHP код:
static stock IsPlayerInLosSantos(playerid)
{
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playeridxyz);
    if(
>= 44.60 && >= -2892.90 && <= 2997.00 && <= -768.00) return 1;
    else return 
0;
}
static 
stock IsPlayerInLasVenturas(playerid)
{
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playeridxyz);
    if(
>= 869.40 && >= 596.30 && <= 2997.00 && <= 2993.80) return 1;
    else return 
0;
}
{
    new 
Float:XFloat:YFloat:Z;
    
GetPlayerPos(playeridXYZ);
    if(
<= max_x && >= min_x && <= max_y && >= min_y) return true;
    return 
0;


OI! Queria saber como fazer para adicionar um TEXTDRAW COM o nome do lugar por exemplo:
O player estб no HQ da Grove Street e dai aparece o nome em TEXDRAW com o nome do lugar dai ele sai da rua dos Grove e essa TEXTDRAW SOME, TEM como me ajudar? estou precisando disso Grato.