30.10.2010, 17:42
Eae pessoal vim aqui para fazer uma perguntinha, o Jim fes esse code pra mim sobre esse negocio de textdraw na gangzone, mais a text nгo aparece alguem sabe oque tб acontecendo ?? ):
By: Jim._.Carrey
pawn Код:
new Text:Test;
new AreadeCarga;
forward PlayerAreaDeCarga(playerid);
forward SaiTextDrawFilhaDaPuta(playerid);
public OnGameModeInit()
{
AreadeCarga = GangZoneCreate(2431.221679, -1736.289306, 2551.221679, -1632.289306);
Test = TextDrawCreate(443.000000, 423.000000,"AreaDeCarga");
TextDrawUseBox(Test, 0);
TextDrawFont(Test, 3);
TextDrawSetShadow(Test,0);
TextDrawSetOutline(Test,2);
TextDrawBackgroundColor(Test,0x000000FF);
TextDrawColor(Test,0xFFFFFFFF);
TextDrawAlignment(Test,3);
TextDrawLetterSize(Test,0.5,1.5);
SetTimer("SaiTextDrawFilhaDaPuta", 5000, 1);
return 1;
}
public PlayerAreaDeCarga(playerid)
{
if(IsPlayerInPlace(playerid, 136.778747, -1976.750732, 168.778747, -1936.750732))
{
TextDrawShowForPlayer(playerid, Test);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, AreadeCarga, -16777017);
return 1;
}
public SaiTextDrawFilhaDaPuta(playerid)
{
TextDrawHideForPlayer(playerid, Test);
return 1;
}
stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
{
new RetValue = 0;
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z );
if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
{
RetValue = 1;
}
return RetValue;
}