SA-MP Forums Archive
[Help] how can i make coins system. IMAGES INCLUDED - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] how can i make coins system. IMAGES INCLUDED (/showthread.php?tid=259438)



[Help] how can i make coins system. IMAGES INCLUDED - vakhtang - 04.06.2011

So here is what I need



I made Some Textdraw:

pawn Code:
#include <a_samp>

new Text:C;
new Text:Symbol;
new Text:One;
new Text:Ten;

public OnFilterScriptInit()
{
    // Cents:
    C = TextDrawCreate(613.000000, 86.000000, "C");
    TextDrawAlignment(C, 2);
    TextDrawBackgroundColor(C, 255);
    TextDrawFont(C, 1);
    TextDrawLetterSize(C, 0.460000, 1.200000);
    TextDrawColor(C, -65281);
    TextDrawSetOutline(C, 1);
    TextDrawSetProportional(C, 1);

    Symbol = TextDrawCreate(583.000000, 89.000000, ".");
    TextDrawAlignment(Symbol, 2);
    TextDrawBackgroundColor(Symbol, 255);
    TextDrawFont(Symbol, 1);
    TextDrawLetterSize(Symbol, 0.460000, 1.200000);
    TextDrawColor(Symbol, -65281);
    TextDrawSetOutline(Symbol, 1);
    TextDrawSetProportional(Symbol, 1);

    One = TextDrawCreate(596.000000, 77.000000, "0");
    TextDrawBackgroundColor(One, 255);
    TextDrawFont(One, 3);
    TextDrawLetterSize(One, 0.569998, 2.200000);
    TextDrawColor(One, -65281);
    TextDrawSetOutline(One, 1);
    TextDrawSetProportional(One, 1);

    Ten = TextDrawCreate(596.000000, 77.000000, "1");
    TextDrawAlignment(Ten, 3);
    TextDrawBackgroundColor(Ten, 255);
    TextDrawFont(Ten, 3);
    TextDrawLetterSize(Ten, 0.569999, 2.200000);
    TextDrawColor(Ten, -65281);
    TextDrawSetOutline(Ten, 1);
    TextDrawSetProportional(Ten, 1);

    return 1;
}

public OnFilterScriptExit()
{
    TextDrawHideForAll(C);
    TextDrawDestroy(C);
    TextDrawHideForAll(Symbol);
    TextDrawDestroy(Symbol);
    TextDrawHideForAll(One);
    TextDrawDestroy(One);
    TextDrawHideForAll(Ten);
    TextDrawDestroy(Ten);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid, C);
    TextDrawShowForPlayer(playerid, Symbol);
    TextDrawShowForPlayer(playerid, One);
    TextDrawShowForPlayer(playerid, Ten);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    TextDrawHideForPlayer(playerid, C);
    TextDrawHideForPlayer(playerid, Symbol);
    TextDrawHideForPlayer(playerid, One);
    TextDrawHideForPlayer(playerid, Ten);
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}



Re: [Help] how can i make coins system. IMAGES INCLUDED - bartje01 - 04.06.2011

At least tell us a bit more about the coin system? I dont know what you want.


Re: [Help] how can i make coins system. IMAGES INCLUDED - vakhtang - 04.06.2011

I want the last two textdraws shown on image to show your amount of money till 100$, so it would look like cents...


Re: [Help] how can i make coins system. IMAGES INCLUDED - LiamM - 05.06.2011

So what your saying is if there is 100c add 1 dollar to the green cash? And keep on adding up and adding up? Its going to be good for roleplay but harder for you to work with currency because you have to subtract cents then too instead of just dollars if you.. know what I mean