[Include] [INC] PCash - Tired of money hackers?
#1

This is a simple Player Cash script. It functions almost the exact same way as money does.

How to install: Add this to the top of your script, under "#include <a_samp>"
pawn Код:
#include <pcash>
New functions:


No credits need to be given to anything.
Original idea by West Side RPG.

Download it here:
Pastebin (.com)
Pastebin (.ca)
Direct link < .inc

Heres the script I tested it with:
Pastebin (.com)
Pastebin (.ca)
Direct link < amx + pwn

Comments are appreciated!

BUG: You have to keep the PCash all in one script, or else it won't sync for the rest. As in, if you put it in your GameMode, don't also use it in a FilterScript, etc.
Reply
#2

Ahh, so its like a replacement for the normal cash? Nice.

WeeDarr
Reply
#3

Ahh yeah, shops, ammunation, casinos etc. Unless you disable them.

WeeDarr
Reply
#4

Yes, a timer should be good.
Cool, very impressive Zezombia.
Congratulations.
Reply
#5

Quote:
Originally Posted by [DSK
Zh3r0 ]
Congratulations.
Lol, this wasn't exactly a big achievement. Thanks anyways.

And for the disable stuff, if a server was to set up to use this, they could not use money in the server, and set a timer to kick anyone that has over 0 cash. Or something...
Reply
#6

Simple

Код:
if(GetPlayerMoney(playerid) > 0)
{
	Kick(playerid);
}
Run that on a timer. Done.

WeeDarr
Reply
#7

nice but you should make a text draw above the real money hud element. That would be good
Reply
#8

Quote:
Originally Posted by WeeDarr
Simple

Код:
if(GetPlayerMoney(playerid) > 0)
{
	Kick(playerid);
}
Run that on a timer. Done.

WeeDarr
I'm not an idiot

Quote:
Originally Posted by Sebihunter
nice but you should make a text draw above the real money hud element. That would be good
I was thinking of that, but I didn't know how I'd do it with an .INC.
Reply
#9

I wasn't directing it at you, i was directing it at anyone who would like to use this include.

WeeDarr
Reply
#10

Quote:
Originally Posted by WeeDarr
Код:
if(GetPlayerMoney(playerid) > 0)
{
	Kick(playerid);
}
What if player will enter TAXI?
Not THAT simple to make it work properly.

@author: You could add as well pretty textdraw for that.
Reply
#11

Quote:
Originally Posted by Puexam
Quote:
Originally Posted by WeeDarr
Код:
if(GetPlayerMoney(playerid) > 0)
{
	Kick(playerid);
}
What if player will enter TAXI?
Not THAT simple to make it work properly.

@author: You could add as well pretty textdraw for that.
1. As I said a sec ago, I don't see how I could add a TextDraw to an .INC.

2. If they enter a taxi they will pay in PCash.
Reply
#12

Quote:
Originally Posted by Zezombia
1. As I said a sec ago, I don't see how I could add a TextDraw to an .INC.
Who said to make it in a INC? You could make a FS with it.
Reply
#13

Quote:
Originally Posted by Zezombia
2. If they enter a taxi they will pay in PCash.
When entering a taxi you get 100$ from GTA itself, so GetPlayerMoney(playerid) will return 100 and so WeeDarr's code will kick the playerid. Same for casinos etc. It's impossible to do a perfect anti money cheat with a Pawn script.

Ideally, we need a OnPlayerGetMoney(playerid, money, type) with types such as Stunt, Casino, ScriptedMoney (what we give with GivePlayerMoney) and obviously MoneyCheat.
[me=yom]dreams..[/me]
Reply
#14

Quote:
Originally Posted by yom
Quote:
Originally Posted by Zezombia
2. If they enter a taxi they will pay in PCash.
When entering a taxi you get 100$ from GTA itself...
Wrong! It's $12 (dollar sign comes first ) from taxis.

Congrats on this script, but I am yet to see how it can properly prevent money hackers. I understand that you can check it with GetPlayerPCash() to see if they have more than you have given them, but as others have previously mentioned, there are casinos and stunt bonuses and all sorts of other good stuff that can have a fair and legal player kicked (if you try to use this as an anticheat).

[me=Cueball]mutters to himself: "yom for mod".[/me]

~Cueball~
Reply
#15

Oh right, $12 or whatever

Quote:
Originally Posted by Cuesphere
yom for mod
Reply
#16

I was messing with textdraw and read this. This is what I came up with.

Compared to the normal text


Covering it with a text box


It seems like it would look good but would hard to keep the text draw updated with their pcash. I mean with a timer but it might go off center. idk :P
Reply
#17

Looks pretty good ill see if I can hack it Dont htink so, its all server side, right? but before i can try i need to get the script working, lol, when i try to run my server with your test script it gives me this error: run time error 20 "invalid index parameter, bad entry point" never seen it before...
Reply
#18

YIPIEEEEEE "!!!

Ty to you for this script

I tried hard to to anything like Rcash ^^



But i ned to save the Money.

So i mean that the System writes a file.


I mean this :

Filename : Nickname.euro


in there there stand the Euro of the player




Ty for help xD


P.s 1. i modified your file but i do your Credits in the Script
P.s 2 Euro because i renamed all Pcash in Euro in my Server
P.s 3 I dont write more P.s`s xD
Reply
#19

mirkoiz: It works the exact same way as money .

backwardsman97: That's freaking sweet . What about timer updates? Also for the center thing, do like:

pawn Код:
if(pcash > 10 && pcash < 100)
{
    format(string, sizeof(string), "000000%d", pcash));
}

else if(pcash > 100 && pcash < 1000)
{
    format(string, sizeof(string), "00000%d", pcash));
}

else if(pcash > 1000 && pcash < 10000)
{
    format(string, sizeof(string), "0000%d", pcash));
}
etc.

That kinda thing?

[ЯЈ®†]$!7ЈС©!Х™: I've already tried hacking it. Changing server variables. You can't :P.
Reply
#20

Quote:
Originally Posted by Zezombia
mirkoiz: It works the exact same way as money .

backwardsman97: That's freaking sweet . What about timer updates? Also for the center thing, do like:

pawn Код:
if(pcash > 10 && pcash < 100)
{
    format(string, sizeof(string), "000000%d", pcash));
}

else if(pcash > 100 && pcash < 1000)
{
    format(string, sizeof(string), "00000%d", pcash));
}

else if(pcash > 1000 && pcash < 10000)
{
    format(string, sizeof(string), "0000%d", pcash));
}
etc.

That kinda thing?

[ЯЈ®†]$!7ЈС©!Х™: I've already tried hacking it. Changing server variables. You can't :P.
Yeah that seems like it would work. I forgot to save the textdraw though but I can make another one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)