[Ajuda] criar textdraw random
#4

DarkScripter
https://sampforum.blast.hk/showthread.php?tid=331395&page=3
pawn Код:
/*
            @Nome: Sprite / Exemplo
            @Crйditos: DarkScripter
*/

#include <a_samp>

new Text:Sprite0;

new Sprites[][128] =
{
    "loadsc10:loadsc10",
    "loadsuk:loadsc2",
    "loadsuk:loadsc3",
    "loadsuk:loadsc4",
    "loadsuk:loadsc5",
    "loadsuk:loadsc6",
    "loadsuk:loadsc8",
    "loadsuk:loadsc9",
    "loadsc13:loadsc13",
    "loadsc12:loadsc12"
};

public OnFilterScriptInit()
{
    Sprite0 = TextDrawCreate(-3.500, -0.500, "loadsc10:loadsc10");
    TextDrawFont(Sprite0, 4);
    TextDrawTextSize(Sprite0, 661.000, 466.000);
    TextDrawColor(Sprite0, -1);
    return 1;
}


public OnFilterScriptExit()
{
    TextDrawDestroy(Sprite0);
    return 1;
}


public OnPlayerConnect(playerid)
{
    TextDrawSetString(Sprite0, Sprites[random(sizeof(Sprites))]);
    TextDrawShowForPlayer(playerid,Sprite0);
    SetTimerEx("Unload", 60000 * 2, false, "d", playerid);
    return 1;
}

forward Unload(p); public Unload(p)
{
    TextDrawHideForPlayer(p, Sprite0);
    return true;
}
Reply


Messages In This Thread
Criar textdraw random - by Blitz22 - 25.12.2013, 16:49
Re: criar textdraw random - by Blitz22 - 25.12.2013, 18:43
Re: criar textdraw random - by goldspy98 - 26.12.2013, 01:06
Re: criar textdraw random - by Breno Da Silva Pereira - 26.12.2013, 08:40

Forum Jump:


Users browsing this thread: 1 Guest(s)