[Ajuda] Coisa louca
#5

pawn Код:
new Text:CashInfo[MAX_PLAYERS];
new Str[128];

enum pInfo {

    pGold

};

new Player[MAX_PLAYERS][pInfo];

public OnPlayerConnect(playerid) {

    CashInfo[playerid] = TextDrawCreate(486.000000, 120.000000, "");
    TextDrawBackgroundColor(CashInfo[playerid], 255);
    TextDrawFont(CashInfo[playerid], 1);
    TextDrawLetterSize(CashInfo[playerid], 0.430000, 1.500000);
    TextDrawColor(CashInfo[playerid], -1);
    TextDrawSetProportional(CashInfo[playerid], 1);
    TextDrawSetShadow(CashInfo[playerid], 1);

    return 1;
}

forward Atualizar(playerid);
public Atualizar(playerid)
{
    format(Str,sizeof(Str),"Cash %d", Player[playerid][pGold]);
    TextDrawSetString(CashInfo[playerid], Str);
    TextDrawShowForPlayer(playerid, CashInfo[playerid]);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetTimerEx("Atualizar", 1000, true, "i", playerid);
    return 1;
}
Bom, testei aqui e funcionou, adapte como quiser.
Reply


Messages In This Thread
Coisa louca - by Don_Speed - 17.11.2013, 20:56
Re: Coisa louca - by Gii - 17.11.2013, 21:03
Re: Coisa louca - by Don_Speed - 17.11.2013, 21:10
Re: Coisa louca - by Locky_ - 17.11.2013, 22:19
Re: Coisa louca - by Gii - 17.11.2013, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)