[FilterScript] Mostrando o Local (LS/SF/LV/SA).
#10

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
pawn Код:
#include <a_samp>

new Text:Local;

public OnFilterScriptInit()
{
    Local = TextDrawCreate(318.000000, 430.000000, "_");
    TextDrawAlignment(Local, 2);
    TextDrawBackgroundColor(Local, -16776961);
    TextDrawFont(Local, 3);
    TextDrawLetterSize(Local, 0.480000, 1.600000);
    TextDrawColor(Local, -1);
    TextDrawSetOutline(Local, 1);
    TextDrawSetProportional(Local, 1);

    return 1;
}

public OnFilterScriptExit()
{
    TextDrawHideForAll(Local);
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(X >= 815 && X <= 3000 && Y >= 717 && Y <= 3000)
    {
        TextDrawHideForPlayer(playerid, Local);
        TextDrawSetString(Local, "~b~Las Venturas");
        TextDrawShowForPlayer(playerid, Local);
    }
    if(X < 0)
    {
        TextDrawHideForPlayer(playerid, Local);
        TextDrawSetString(Local, "~b~San Fierro");
        TextDrawShowForPlayer(playerid, Local);
    }
    if(X > 0 && Y < 0)
    {
        TextDrawHideForPlayer(playerid, Local);
        TextDrawSetString(Local, "~b~Los Santos");
        TextDrawShowForPlayer(playerid, Local);
    }
    if(!(X >= 815 && X <= 3000 && Y >= 717 && Y <= 3000) && !(X < 0) && !(X > 0 && Y < 0))
    {
        TextDrawHideForPlayer(playerid, Local);
        TextDrawSetString(Local, "~b~San Andreas");
        TextDrawShowForPlayer(playerid, Local);
    }
    return 1;
}
Nгo intendi muito como se usa mais textdraw's usando SetString do que criando vбrias td's idкnticas, ( Cor / Modelo )
Hб altas chances de isso mostrar um texto errado, alйm de criar 3 draws ser mais otimizado.

Jб corrigi o que eu havia dito sobre as 1500, o certo seria 500. Nгo sei de onde tirei 1500, XD
Reply


Messages In This Thread
Mostrando o Local (LS/SF/LV/SA). - by DanDRT - 20.03.2013, 19:02
Re: Mostrando o Local (LS/SF/LV/SA). - by Maklister - 20.03.2013, 19:11
Re: Mostrando o Local (LS/SF/LV/SA). - by DanDRT - 20.03.2013, 19:14
Re: Mostrando o Local (LS/SF/LV/SA). - by Vitor_Gorzoni - 21.03.2013, 00:22
Re: Mostrando o Local (LS/SF/LV/SA). - by Kuddy - 21.03.2013, 01:48
Re: Mostrando o Local (LS/SF/LV/SA). - by DanDRT - 21.03.2013, 11:46
Re: Mostrando o Local (LS/SF/LV/SA). - by Maklister - 21.03.2013, 14:06
Re: Mostrando o Local (LS/SF/LV/SA). - by RebeloX - 21.03.2013, 14:06
Re: Mostrando o Local (LS/SF/LV/SA). - by Dwayne-Pheonix - 21.03.2013, 14:51
Re: Mostrando o Local (LS/SF/LV/SA). - by Kuddy - 21.03.2013, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)