Jump to content
  • 0
XMortX

Humanity change

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

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...