Jump to content
  • 0

Humanity change


XMortX

Question

Hi guys, i have config traders set-up on my server and id like to add a way to change humanity when a player buys something from the hero vendor or the bandit vendor.......

I tried changing this inside "PoliceVehicles.hpp":-

class CVPI_Patrol {
type = "trade_any_vehicle";
buy[] = {1,"ItemBriefcase100oz"};
sell[] = {8,"ItemGoldBar10oz"};

to this :-

class CVPI_Patrol {
type = "trade_any_vehicle";
buy[] = {1,"ItemBriefcase100oz",-1000,"_humanity"};
sell[] = {8,"ItemGoldBar10oz"};

with no effect.....

Am i on the complete wrong track? i thought the humanity variable would change the player humanity but i guess not..... any insights?

My goal being to eventually change it to something more like this :-

if (_humanity>5000) then {

class CVPI_Patrol {
type = "trade_any_vehicle";
buy[] = {1,"ItemBriefcase100oz",1000,"_humanity"};
sell[] = {8,"ItemGoldBar10oz"};

else if (_humanity<-5000) then {

class CVPI_Patrol {
type = "trade_any_vehicle";
buy[] = {1,"ItemBriefcase100oz",-1000,"_humanity"};
sell[] = {8,"ItemGoldBar10oz"};

};

};

Thanks in advance for any help offered guys!

Regards,

XMortX

Edited by XMortX
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...