SA-MP Forums Archive
[Include] [INC] PCash - Tired of money hackers? - 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)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [INC] PCash - Tired of money hackers? (/showthread.php?tid=40128)

Pages: 1 2 3


Re: [INC] PCash - Tired of money hackers? - eXchainZ-FoReVeR - 14.09.2009

Finally an advanced Money Hack detector...

I was tired from Those money hack anti-cheat scripts...
Which use's GetPlayerMoney


Re: [INC] PCash - Tired of money hackers? - Jafri - 23.09.2009

I'm Sure Like OnPlayerUpdate You Can Do Textdraws




Re: [INC] PCash - Tired of money hackers? - Jafri - 23.09.2009

Help me!!!!

How to Write PCash To Player File


Re: [INC] PCash - Tired of money hackers? - Jafri - 24.09.2009

Quote:
Originally Posted by Jafri
Help me!!!!

How to Write PCash To Player File
bump


Re: [INC] PCash - Tired of money hackers? - Jafri - 25.09.2009

Quote:
Originally Posted by Jafri
Quote:
Originally Posted by Jafri
Help me!!!!

How to Write PCash To Player File
bump
Gawd. Anyone Help pl0x


Re: [INC] PCash - Tired of money hackers? - Lightning[SV] - 25.09.2009

Hey Jafri!

I don't know what type of file system you have or if you have a login system, but something like this is easy to do with dini. You'll need to download the dini include.

Something like this would work:

Save the pcash on disconnect

Код:
public OnPlayerDisconnect(playerid, reason)
{
	  new file[128], pname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, pname, sizeof(pname));
	  format(file, sizeof(file), "%s.ini", pname);

      if(!dini_Exists(file))
      {
          dini_Create(file);
      }

	  dini_IntSet(file, "PCash", GetPlayerPCash(playerid));

      ResetPlayerPCash(playerid); //reset Pcash for security

      return 1;
}
Give the player their PCash when they connect (or add something like this to your login system otherwise anyone with the same name could join and get the pcash)

Код:
public OnPlayerConnect(playerid)
{
	  new file[128], pname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, pname, sizeof(pname));
	  format(file, sizeof(file), "%s.ini", pname);

      if(dini_Exists(file))
      {
          GivePlayerPCash(playerid, dini_Int(file, "PCash"));
      }

      return 1;
}
Hope this helps


Re: [INC] PCash - Tired of money hackers? - Jafri - 25.09.2009

Quote:
Originally Posted by wil2140
Hey Jafri!

I don't know what type of file system you have or if you have a login system, but something like this is easy to do with dini. You'll need to download the dini include.

Something like this would work:

Save the pcash on disconnect

Код:
public OnPlayerDisconnect(playerid, reason)
{
	  new file[128], pname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, pname, sizeof(pname));
	  format(file, sizeof(file), "%s.ini", pname);

      if(!dini_Exists(file))
      {
          dini_Create(file);
      }

	  dini_IntSet(file, "PCash", GetPlayerPCash(playerid));

      ResetPlayerPCash(playerid); //reset Pcash for security

      return 1;
}
Give the player their PCash when they connect (or add something like this to your login system otherwise anyone with the same name could join and get the pcash)

Код:
public OnPlayerConnect(playerid)
{
	  new file[128], pname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, pname, sizeof(pname));
	  format(file, sizeof(file), "%s.ini", pname);

      if(dini_Exists(file))
      {
          GivePlayerPCash(playerid, dini_Int(file, "PCash"));
      }

      return 1;
}
Hope this helps
Hey Wil.

I'm Using LA:RP Script. So i think this might work Also i am Jafri's Cousin I'm using his account for now.


Re: [INC] PCash - Tired of money hackers? - Lightning[SV] - 25.09.2009

Hi there, i know Jafri from WS

I haven't seen LA:RP but its probably has a system which saves players money using GetPlayerMoney, so in theory replacing all the GetPlayerMoney with GetPlayerPCash would save it with the rest of the players data.

btw nice include Zezombia


Re: [INC] PCash - Tired of money hackers? - Jafri - 25.09.2009

Quote:
Originally Posted by wil2140
Hi there, i know Jafri from WS

I haven't seen LA:RP but its probably has a system which saves players money using GetPlayerMoney, so in theory replacing all the GetPlayerMoney with GetPlayerPCash would save it with the rest of the players data.

btw nice include Zezombia
It's Actually SafeGetPlayerMoney :S


Re: [INC] PCash - Tired of money hackers? - DokerJr - 25.09.2009

GG Zezombia
Nice include




Re: [INC] PCash - Tired of money hackers? - XCultz - 26.09.2009

true but if it was more compatible with more functions would be better


Re: [INC] PCash - Tired of money hackers? - juuleman - 10.11.2009

How i can make a command like /change that changes the PCash to the normal cash?


Re: [INC] PCash - Tired of money hackers? - x-cutter - 10.11.2009

Quote:
Originally Posted by [ECR
SancheZ ]
How i can make a command like /change that changes the PCash to the normal cash?
simple.

GetPlayerPCash
GivePlayerMoney


Re: [INC] PCash - Tired of money hackers? - juuleman - 11.11.2009

Quote:
Originally Posted by [ECR
SancheZ ]
How i can make a command like /change that changes the PCash to the normal cash?
Whoops my fault, there just was a cmd that does that.

But can someone help me making a bar that shows the PCash just below the normal cash ? Thanks.


Re: [INC] PCash - Tired of money hackers? - Oxside - 25.12.2009

A function for it:
Код:
stock SetPlayerPCash(playerid, value)
{
   PCash[playerid] = 0;
   PCash[playerid] = PCash[playerid] + value;
   return PCash[playerid];
}



Re: [INC] PCash - Tired of money hackers? - Juanxz - 30.01.2010

Does this work with the godfather gm?


Re: [INC] PCash - Tired of money hackers? - thekiller01 - 13.04.2012

the download link for the .inc is dead can anyone send me working please?