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(playerid, x, y, z);
    if(
x >= 44.60 && y >= -2892.90 && x <= 2997.00 && y <= -768.00) return 1;
    else return 
0;
}

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

static 
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
    new 
Float:X, Float:Y, Float:Z;
    
GetPlayerPos(playerid, X, Y, Z);
    if(
X <= max_x && X >= min_x && Y <= max_y && 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(playerid, x, y, z);
    if(
x >= 44.60 && y >= -2892.90 && x <= 2997.00 && y <= -768.00) return 1;
    else return 
0;
}
static 
stock IsPlayerInLasVenturas(playerid)
{
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playerid, x, y, z);
    if(
x >= 869.40 && y >= 596.30 && x <= 2997.00 && y <= 2993.80) return 1;
    else return 
0;
}
{
    new 
Float:X, Float:Y, Float:Z;
    
GetPlayerPos(playerid, X, Y, Z);
    if(
X <= max_x && X >= min_x && Y <= max_y && 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.