SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 05/03/2011, 07:31 PM   #1
Rock18
Big Clucker
 
Join Date: Nov 2010
Location: fuck off.
Posts: 169
Reputation: 0
Default Rock's Coin System

Rock's Coin System

Introduction :
This is a coin system , like second money.
Commands :
This filescript includes this commands
  • /givecoins - players can transfer coins to others
  • /coins - see other player coins
  • /mycoins - see how much coins you have
  • /setcoins - RCON Admin only , set's a player amount of coins .
New commands using coins :
This is an example of new commands using coins
Code:
CMD:hacked(playerid,params[])
{
pInfo[playerid][Coins] -= 100;
SendClientMessage(playerid,0xFFFFFFAA,"HaHaHa !!! You have been hacked ! 100 Coins are taken from you .");
return 1;
}
This function
Code:
pInfo[playerid][Coins] -= 100;
Takes 100 coins from player who typed /hacked
And this is another example
Code:
CMD:hacker(playerid,params[])
{
pInfo[playerid][Coins] += 100;
SendClientMessage(playerid,0xFFFFFFAA,"You Hacked somebody ! You get 100 Coins .");
return 1;
}
This function
Code:
pInfo[playerid][Coins] += 100;
Give's player 100 coins
The differences between this 2 functions are "+" and "-"
see here
Code:
pInfo[playerid][Coins] -= 100;
pInfo[playerid][Coins] += 100;
Download :
Ps : I've created this because i've searched for something like this and didn't found .
Rock18 is offline   Reply With Quote
Old 05/03/2011, 07:34 PM   #2
Master_Gangster
Huge Clucker
 
Master_Gangster's Avatar
 
Join Date: Jan 2009
Posts: 269
Reputation: 0
Default Re: Rock's Coin System

very useful for RP servers (: great job
Master_Gangster is offline   Reply With Quote
Old 05/03/2011, 07:38 PM   #3
NekErM@N
Big Clucker
 
Join Date: Feb 2011
Posts: 67
Reputation: 0
Default Re: Rock's Coin System

very nice
__________________
NekErM@N is offline   Reply With Quote
Old 05/03/2011, 07:42 PM   #4
Zh3r0
High-roller
 
Join Date: Mar 2008
Posts: 4,513
Reputation: 398
Default Re: Rock's Coin System

The hacked commands make no sense, however, this system looks familiar ...
__________________
Zh3r0 is offline   Reply With Quote
Old 05/03/2011, 07:46 PM   #5
Rock18
Big Clucker
 
Join Date: Nov 2010
Location: fuck off.
Posts: 169
Reputation: 0
Default Re: Rock's Coin System

Quote:
Originally Posted by Zh3r0 View Post
The hacked commands make no sense, however, this system looks familiar ...
I know but i make it quickly and it looks familiar to you because this system you will find in that server that you hate ...
Rock18 is offline   Reply With Quote
Old 05/03/2011, 07:51 PM   #6
Master_Gangster
Huge Clucker
 
Master_Gangster's Avatar
 
Join Date: Jan 2009
Posts: 269
Reputation: 0
Default Re: Rock's Coin System

Quote:
Originally Posted by Rock18 View Post
I know but i make it quickly and it looks familiar to you because this system you will find in that server that you hate ...
aren't these 2 commands the same lol?

Code:
CMD:hacked(playerid,params[])
{
pInfo[playerid][Coins] -= 100;
SendClientMessage(playerid,0xFFFFFFAA,"HaHaHa !!! You have been hacked ! 100 Coins are taken from you .");
return 1;
}
 
CMD:hacker(playerid,params[])
{
pInfo[playerid][Coins] += 100;
SendClientMessage(playerid,0xFFFFFFAA,"You Hacked somebody ! You get 100 Coins .");
return 1;
}
Master_Gangster is offline   Reply With Quote
Old 05/03/2011, 07:56 PM   #7
Rock18
Big Clucker
 
Join Date: Nov 2010
Location: fuck off.
Posts: 169
Reputation: 0
Default Re: Rock's Coin System

Yea , same thins , I left that commands in fs to see an example .
Rock18 is offline   Reply With Quote
Old 05/03/2011, 09:19 PM   #8
iMonk3y
Huge Clucker
 
iMonk3y's Avatar
 
Join Date: Oct 2008
Location: Asylum
Posts: 316
Reputation: 48
Default Re: Rock's Coin System

Are you sure this is correct?

pawn Code:
public OnPlayerConnect(playerid) { SavePlayerCoins(playerid); return 1; }
 
public OnPlayerDisconnect(playerid, reason) { LoadPlayerCoins(playerid); return 1; }
iMonk3y is offline   Reply With Quote
Old 05/03/2011, 09:31 PM   #9
Rock18
Big Clucker
 
Join Date: Nov 2010
Location: fuck off.
Posts: 169
Reputation: 0
Default Re: Rock's Coin System

Yeah ... that works fine ... test and you will see...
Rock18 is offline   Reply With Quote
Old 05/03/2011, 10:02 PM   #10
YangOn
Little Clucker
 
YangOn's Avatar
 
Join Date: Feb 2011
Posts: 18
Reputation: 6
Default Re: Rock's Coin System

Nice!
YangOn 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
[HELP] Robbery system, tax system, houseing system Commander_Shaw Help Archive 3 15/09/2010 04:18 AM


All times are GMT. The time now is 09:05 AM.


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