SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 04/06/2011, 06:06 PM   #1
vakhtang
Big Clucker
 
vakhtang's Avatar
 
Join Date: Jul 2010
Location: Georgia
Posts: 151
Reputation: 1
Question [Help] how can i make coins system. IMAGES INCLUDED

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;
}
vakhtang is offline  
Old 04/06/2011, 06:08 PM   #2
bartje01
High-roller
 
Join Date: Jan 2009
Posts: 1,419
Reputation: 6
Default Re: [Help] how can i make coins system. IMAGES INCLUDED

At least tell us a bit more about the coin system? I dont know what you want.
bartje01 is offline  
Old 04/06/2011, 06:10 PM   #3
vakhtang
Big Clucker
 
vakhtang's Avatar
 
Join Date: Jul 2010
Location: Georgia
Posts: 151
Reputation: 1
Default Re: [Help] how can i make coins system. IMAGES INCLUDED

I want the last two textdraws shown on image to show your amount of money till 100$, so it would look like cents...
vakhtang is offline  
Old 05/06/2011, 01:20 AM   #4
LiamM
Huge Clucker
 
LiamM's Avatar
 
Join Date: Oct 2010
Location: Edinburgh, Scotland
Posts: 324
Reputation: 36
Default Re: [Help] how can i make coins system. IMAGES INCLUDED

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
__________________
If I helped you at any point! Make sure to rep me by clicking the symbol on the left < Thanks guys!
LiamM is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Coins [DJ]Boki Filterscripts 15 06/04/2011 03:32 PM
help about a coins system please help me jejemonerz123 Help Archive 15 30/03/2011 08:05 PM
Coins help Edvin Help Archive 6 27/02/2011 07:51 AM
PHP Help,System Images ipsBruno Everything and Nothing 0 10/11/2010 12:53 PM


All times are GMT. The time now is 06:00 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.