SA-MP Forums Archive
GivePlayerMoney Filterscript - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GivePlayerMoney Filterscript (/showthread.php?tid=458004)



GivePlayerMoney Filterscript - Donvalley - 14.08.2013

Hey guys i did some searching but no luck i am using Evo's Vehicle System Filterscript and for some reason the GivePlayerMoney doesnt seem to be working. you but something it just resets your money. doesnt take any away

ie. when you buy a car the money gets taken away and then straight away it goes back to what you had. so therefore your getting the car for free lol

someone help?


Re: GivePlayerMoney Filterscript - Yves - 14.08.2013

try and use GivePlayerCash


Re: GivePlayerMoney Filterscript - Donvalley - 14.08.2013

undefined symbol, when you buy a car it takes the money but straight away it refills itself back to what you had before purchasing the car lol?


Re: GivePlayerMoney Filterscript - jessejanssen - 14.08.2013

So, if I understand it correctly you got a gamemode and a filterscript for the money part? Because in that case it sounds like there is an anti-moneycheat in your main script what works like this:
- The amount of money you have is stored in a variable.
- In a timer a loop checks wether the amount of money ( GetPlayerMoney ) is different.
- If different the money will be reset ( ResetPlayerMoney ).
- It will give the amount of money what's stored in the variable.

If that's the case you should either remove the filterscript and just taking care of money in the main script or you should use PVars ( SetPVarInt & GetPVarInt. ).

Best regards,
Jesse


Re: GivePlayerMoney Filterscript - Yves - 14.08.2013

Код:
stock GivePlayerCash(playerid, money)
{
	PlayerInfo[playerid][pCash] += money;
	ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
	return PlayerInfo[playerid][pCash];
}
i had the same issue and all i did was changed it to GivePlayerCash and it worked perfect..


Re: GivePlayerMoney Filterscript - Donvalley - 14.08.2013

Quote:
Originally Posted by Yves
Посмотреть сообщение
Код:
stock GivePlayerCash(playerid, money)
{
	PlayerInfo[playerid][pCash] += money;
	ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
	return PlayerInfo[playerid][pCash];
}
i had the same issue and all i did was changed it to GivePlayerCash and it worked perfect..
pawn Код:
C:\Users\HP\Documents\Life Like Roleplay\Gamemode\VEH SYSTEM\LLRP-VEH.pwn(349) : error 017: undefined symbol "PlayerInfo"
C:\Users\HP\Documents\Life Like Roleplay\Gamemode\VEH SYSTEM\LLRP-VEH.pwn(349) : warning 215: expression has no effect
C:\Users\HP\Documents\Life Like Roleplay\Gamemode\VEH SYSTEM\LLRP-VEH.pwn(349) : error 001: expected token: ";", but found "]"
C:\Users\HP\Documents\Life Like Roleplay\Gamemode\VEH SYSTEM\LLRP-VEH.pwn(349) : error 029: invalid expression, assumed zero
C:\Users\HP\Documents\Life Like Roleplay\Gamemode\VEH SYSTEM\LLRP-VEH.pwn(349) : fatal error 107: too many error messages on one line

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


4 Errors.
all these on this line:

pawn Код:
PlayerInfo[playerid][pCash] += money;