SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 13/06/2013, 08:31 AM   #1
xFirex
Big Clucker
 
Join Date: May 2013
Posts: 94
Reputation: 17
Default Help Me With Coin System

hi i see some server created coins system, i want it too

example:

pls help me
xFirex is offline   Reply With Quote
Old 13/06/2013, 08:49 AM   #2
xFirex
Big Clucker
 
Join Date: May 2013
Posts: 94
Reputation: 17
Default Re: Help Me With Coin System

up...
xFirex is offline   Reply With Quote
Old 13/06/2013, 08:55 AM   #3
park4bmx
High-roller
 
park4bmx's Avatar
 
Join Date: Dec 2009
Location: Samokov,Bulgaria
Posts: 2,361
Reputation: 240
Default Re: Help Me With Coin System

this a help section you need to provide some code !

at least make the textdraw!

then save them into a player variable
pawn Code:
new pPlayerXp[MAX_PLAYERS];

stock GivePlayerXP(playerid,XP)
{
      pPlayerXp[playerid] += XP;
      return 1;
}
stock RemovePlayerXP(playerid,XP)
{
      pPlayerXp[playerid] -= XP;
      return 1;
}
stock ResetPlayerXP(playerid,XP)
{
      pPlayerXp[playerid] =0;
      return 1;
}
stock UpdatePlayerXP(playerid,XP)
{
      new Str[20];format(Str, sizeof Str, "XP: %d", pPlayerXp[playerid]);
      TextDrawSetString(YourTextdrawID, Str);  
      return 1;
}
that will get you started
park4bmx is offline   Reply With Quote
Old 13/06/2013, 09:04 AM   #4
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,885
Reputation: 1321
Default Re: Help Me With Coin System

Quote:
Originally Posted by park4bmx View Post
this a help section you need to provide some code !

at least make the textdraw!

then save them into a player variable
pawn Code:
new pPlayerXp[MAX_PLAYERS];

stock GivePlayerXP(playerid,XP)
{
      pPlayerXp[playerid] += XP;
      return 1;
}
stock RemovePlayerXP(playerid,XP)
{
      pPlayerXp[playerid] -= XP;
      return 1;
}
stock ResetPlayerXP(playerid,XP)
{
      pPlayerXp[playerid] =0;
      return 1;
}
stock UpdatePlayerXP(playerid,XP)
{
      new Str[20]; format(Str, sizeof Str, "XP: %d", pPlayerXp[playerid]);
      TextDrawSetString(YourTextdrawID, Str);  
      return 1;
}
that will get you started
Why use stock functions ?
Why bother using "return 1;" on UpdatePlayerXP?

pawn Code:
new pPlayerXp[MAX_PLAYERS];

#define GivePlayerXP(%0,%1) pPlayerXp[%0] += %1
#define RemovePlayerXP(%0,%1) pPlayerXp[%0] -= %1
#define ResetPlayerXP(%0) pPlayerXp[%0] = 0

stock UpdatePlayerXP(playerid)
{
      new Str[20];
      format(Str, sizeof Str, "XP: %d", pPlayerXp[playerid]);
      TextDrawSetString(YourTextdrawID, Str);
}
Pottus is offline   Reply With Quote
Old 13/06/2013, 09:13 AM   #5
xFirex
Big Clucker
 
Join Date: May 2013
Posts: 94
Reputation: 17
Default Re: Help Me With Coin System

san you make it to YSI ? or dini ?

EDIT: can you make it to YSI ? or dini ?
xFirex is offline   Reply With Quote
Reply

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] NRank System V1.0 | Advanced Rank System | 5+ Commands | Dialog System [Much More] Nirzor Filterscripts 9 18/04/2014 09:49 PM
[FilterScript] Cross Admin System V1.2 [updated] + Added IRC System + Anti Cheat(sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 21 02/01/2013 06:32 PM
Coin System help Slaykler Scripting Help 1 20/09/2012 01:55 PM
[FilterScript] Rock's Coin System Rock18 Filterscripts 12 08/07/2012 08:03 AM


All times are GMT. The time now is 02:08 AM.


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