SA-MP Forums Archive
[FilterScript] Rock's Coin System - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Rock's Coin System (/showthread.php?tid=235488)



Rock's Coin System - Rock18 - 05.03.2011

Rock's Coin System
Introduction :
This is a coin system , like second money.
Commands :
This filescript includes this commandsNew 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 .


Re: Rock's Coin System - Master_Gangster - 05.03.2011

very useful for RP servers (: great job


Re: Rock's Coin System - NekErM@N - 05.03.2011

very nice


Re: Rock's Coin System - Zh3r0 - 05.03.2011

The hacked commands make no sense, however, this system looks familiar ...


Re: Rock's Coin System - Rock18 - 05.03.2011

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 ...


Re: Rock's Coin System - Master_Gangster - 05.03.2011

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;
}



Re: Rock's Coin System - Rock18 - 05.03.2011

Yea , same thins , I left that commands in fs to see an example .


Re: Rock's Coin System - iMonk3y - 05.03.2011

Are you sure this is correct?

pawn Code:
public OnPlayerConnect(playerid) { SavePlayerCoins(playerid); return 1; }
 
public OnPlayerDisconnect(playerid, reason) { LoadPlayerCoins(playerid); return 1; }



Re: Rock's Coin System - Rock18 - 05.03.2011

Yeah ... that works fine ... test and you will see...


Re: Rock's Coin System - YangOn - 05.03.2011

Nice!


Re: Rock's Coin System - Master_Gangster - 06.03.2011

Quote:
Originally Posted by Tupac
Посмотреть сообщение
lolol his saveplayercoins is actually loading, and loadplayercoins is actually saving xD
Typo? o_0


Re: Rock's Coin System - Edvin - 06.03.2011

veryy good....rock....gj 10/10


Re: Rock's Coin System - xSkullx - 08.07.2012

pawn Код:
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(7) : error 017: undefined symbol "numargs"
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(7) : warning 217: loose indentation
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(7) : error 029: invalid expression, assumed zero
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(7) : warning 215: expression has no effect
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(8) : warning 217: loose indentation
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(40) : error 017: undefined symbol "setarg"
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(40) : warning 215: expression has no effect
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(40) : warning 215: expression has no effect
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(40) : warning 215: expression has no effect
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(40) : error 001: expected token: ";", but found ")"
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(40) : error 029: invalid expression, assumed zero
C:\Users\ady-kryss\Desktop\Server SA-MP\pawno\include\sscanf.inc(40) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Help pe please