Jump to content
bong oh

Trying make custom point& store system...

Recommended Posts

9 minutes ago, Spriterfight said:

let me check this in my game

Now.. this is work.. I can't understand this code is same above that but work.. I found red dot in code  when I put here.

then I remove that dot and copy in game, that code work correctly . wtf is that... any way yup... work

this addAction ["Buy truck", "if (((_this select 1) getVariable ""YOU_account"")>1500) then    
 {systemChat ""you bought truck!"";    
 [_this select 1, -1500] call YOU_fnc_account,;    
_spawnedvehicle = createVehicle[""rhsusf_m1078A1P2_B_D_fmtv_usarmy"",getMarkerPos ""Truck"",[], 0, ""NONE""];
clearWeaponCargoGlobal _spawnedvehicle;
clearMagazineCargoGlobal _spawnedvehicle;
clearItemCargoGlobal _spawnedvehicle;
 }   
 else {systemChat ""Not Enough Money""};"];   

 

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, bong oh said:

Now.. this is work.. I can't understand this code is same above that but work.. I found red dot in code  when I put here.

then I remove that dot and copy, that code work correctly . wtf is that... any way yup... work


this addAction ["Buy truck", "if (((_this select 1) getVariable ""YOU_account"")>1500) then    
 {systemChat ""you bought truck!"";    
 [_this select 1, -1500] call YOU_fnc_account,;    
_spawnedvehicle = createVehicle[""rhsusf_m1078A1P2_B_D_fmtv_usarmy"",getMarkerPos ""Truck"",[], 0, ""NONE""];
clearWeaponCargoGlobal _spawnedvehicle;
clearMagazineCargoGlobal _spawnedvehicle;
clearItemCargoGlobal _spawnedvehicle;
 }   
 else {systemChat ""Not Enough Money""};"];   

 

Without error?Any unnecsesary element in  syntax can cause error.

Share this post


Link to post
Share on other sites
this addAction ["Buy Truck", "if (((_this select 1) getVariable ""YOU_account"")>1500) then    
 {systemChat ""you bought Truck!"";    
 [_this select 1, -1500] call YOU_fnc_account,;    
_spawnedvehicle = createVehicle[""rhsusf_m1078A1P2_B_D_fmtv_usarmy"",getMarkerPos""Truck"",[], 0, ""NONE""];
clearWeaponCargoGlobal _spawnedvehicle;
clearMagazineCargoGlobal _spawnedvehicle;
clearItemCargoGlobal _spawnedvehicle;
clearBackpackCargoGlobal _spawnedvehicle;
 }   
 else {systemChat ""Not Enough Money""};"]; 

this addAction ["Buy Humbee", "if (((_this select 1) getVariable ""YOU_account"")>2500) then    
 {systemChat ""you bought Humbee!"";    
 [_this select 1, -2500] call YOU_fnc_account,;    
_spawnedvehicle = createVehicle[""rhsusf_m1078A1P2_B_D_fmtv_usarmy"",getMarkerPos""Car"",[], 0, ""NONE""];
clearWeaponCargoGlobal _spawnedvehicle;
clearMagazineCargoGlobal _spawnedvehicle;
clearItemCargoGlobal _spawnedvehicle;
clearBackpackCargoGlobal _spawnedvehicle;
 }   
 else {systemChat ""Not Enough Money""};"];  
  
this addAction ["Buy MRAP", "if (((_this select 1) getVariable ""YOU_account"")>3500) then    
 {systemChat ""you bought MRAP!"";    
 [_this select 1, -3500] call YOU_fnc_account,;    
_spawnedvehicle = createVehicle[""rhsusf_M1230_M2_usarmy_d"",getMarkerPos""Mrap"",[], 0, ""NONE""];
clearWeaponCargoGlobal _spawnedvehicle;
clearMagazineCargoGlobal _spawnedvehicle;
clearItemCargoGlobal _spawnedvehicle;
clearBackpackCargoGlobal _spawnedvehicle;
 }   
 else {systemChat ""Not Enough Money""};"];  
  
this addAction ["Buy Heli", "if (((_this select 1) getVariable ""YOU_account"")>3500) then    
 {systemChat ""you bought Heli!"";    
 [_this select 1, -3500] call YOU_fnc_account,;    
_spawnedvehicle = createVehicle[""RHS_MELB_AH6M"",getMarkerPos""Heli"",[], 0, ""NONE""];
clearWeaponCargoGlobal _spawnedvehicle;
clearMagazineCargoGlobal _spawnedvehicle;
clearItemCargoGlobal _spawnedvehicle;
clearBackpackCargoGlobal _spawnedvehicle;
 }   
 else {systemChat ""Not Enough Money""};"]; 
 
this setObjectTexture[0,"pic\car3.jpg"];

 

Share this post


Link to post
Share on other sites
1 minute ago, bong oh said:

yup without error . I don't know about red dot in code that copy from here.. but actually work without error 

You can copy paste it then and do it with naother vehicle.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×