[Pedido] VIPoints e Nome em cima do player
#8

Grana secundбria:
pawn Код:
new Text:Money[MAX_PLAYERS], Dinheiro[MAX_PLAYERS];
forward GetDinheiro(playerid);

//OnGameModeInit
for(new i; i < MAX_PLAYERS; ++i)
{
Money[i] = TextDrawCreate(499.000000, 77.000000, "$00000000");
        TextDrawBackgroundColor(Money[i], 255);
        TextDrawFont(Money[i], 3);
        TextDrawLetterSize(Money[i], 0.600000, 2.099998);
        TextDrawColor(Money[i], -65281);
        TextDrawSetOutline(Money[i], 0);
        TextDrawSetProportional(Money[i], 1);
        TextDrawSetShadow(Money[i], 1);
}

//Final do script
stock GivePlayerGrana(playerid, grana)
{
    Dinheiro[playerid] += grana;
    return Dinheiro[playerid];
}

public GetDinheiro(playerid)
{
    new A_string[30];
    format(A_string,30,"$%08d",Dinheiro[playerid]);
    TextDrawSetString(Money[playerid], A_string);
    TextDrawShowForPlayer(playerid, Money[playerid]);
}

//OnPlayerConnect
SetTimerEx("GetDinheiro",2000,true,"i",playerid);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)