Jump to content

[TUTORIAL] Harvestable hemp, smoking weed, pot farms.


FragZ

Recommended Posts

hm, i have newest infistar installed and i am as admin inside. but i also wont geht those effects with my fresh installed "Smoke the Bong at Traders"  which is nearly the same.

 

no matter which effect script i use on both (smoke the bong and smoke the weed)  i only get black / white screen, all the animations and sounds work well.. thats all...

 

any suggestions?

 

i really want those color phase shiftings with blur and stuff, stuttering cam effects, like shown in the picture/video above...

Link to comment
Share on other sites

  • 2 weeks later...

ok, yesterday i found my client RPT for the first time.. i thought before, that it would be merged with the server  rpt, but that wasnt..

 

so here is an error about that smoking stuff

Error in expression <ayer_fillfuel = -1;
player removeAction s_player_hookahHit;
s_player_hookahHit =>
  Error position: <s_player_hookahHit;
s_player_hookahHit =>
  Error Undefined variable in expression: s_player_hookahhit
File mpmissions\__CUR_MP.Chernarus\scripts\fn_selfActions.sqf, line 942
..
.

Error in expression <"",""];
};
} else {
player removeAction s_player_hookahHit;
s_player_hookahHit =>
  Error position: <s_player_hookahHit;
s_player_hookahHit =>
  Error Undefined variable in expression: s_player_hookahhit
File mpmissions\__CUR_MP.Chernarus\scripts\fn_selfActions.sqf, line 655
Client: Object 2:677 (type Type_98) not found.
Cannot create non-ai vehicle c_grasstall,
any ideas?
Link to comment
Share on other sites

  On 3/13/2015 at 1:22 AM, cheech said:

 

ok, yesterday i found my client RPT for the first time.. i thought before, that it would be merged with the server  rpt, but that wasnt..

 

so here is an error about that smoking stuff

Error in expression <ayer_fillfuel = -1;
player removeAction s_player_hookahHit;
s_player_hookahHit =>
  Error position: <s_player_hookahHit;
s_player_hookahHit =>
  Error Undefined variable in expression: s_player_hookahhit
File mpmissions\__CUR_MP.Chernarus\scripts\fn_selfActions.sqf, line 942
..
.

Error in expression <"",""];
};
} else {
player removeAction s_player_hookahHit;
s_player_hookahHit =>
  Error position: <s_player_hookahHit;
s_player_hookahHit =>
  Error Undefined variable in expression: s_player_hookahhit
File mpmissions\__CUR_MP.Chernarus\scripts\fn_selfActions.sqf, line 655
Client: Object 2:677 (type Type_98) not found.
Cannot create non-ai vehicle c_grasstall,
any ideas?

 

where did you get the variable hookahhit from? I dont remember seeing that in the script. Anyways, post your fn_selfactions.sqf, just the part where this is, not the whole thing.

Link to comment
Share on other sites

omg,

i was trying to use the same effect on the hookah bong,

wrong error msg..sorry, my bad...

here´s the correct one, there we can see why GR8´s version does not work on my server...

 

Error in expression <icle _weed;
[_objectID,_objectUID] call server_deleteObj;
_weed setDamage 1;
pla>
  Error position: <server_deleteObj;
_weed setDamage 1;
pla>
  Error Undefined variable in expression: server_deleteobj
File mpmissions\__CUR_MP.Chernarus\scripts\hemp.sqf, line 31
Error in expression <lse {Flare attachTo [player,[0,0,0.]];}
ppe2 = ppEffectCreate ["chromAberration">
  Error position: <ppe2 = ppEffectCreate ["chromAberration">
  Error Missing ;
File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31
Error in expression <lse {Flare attachTo [player,[0,0,0.]];}
ppe2 = ppEffectCreate ["chromAberration">
  Error position: <ppe2 = ppEffectCreate ["chromAberration">
  Error Missing ;
File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31
 

here´s the hemp.sqf  

 

  Reveal hidden contents

here´s the smokeshit.sqf

  Reveal hidden contents

Link to comment
Share on other sites

  On 3/15/2015 at 5:57 AM, cheech said:

omg,

i was trying to use the same effect on the hookah bong,

wrong error msg..sorry, my bad...

here´s the correct one, there we can see why GR8´s version does not work on my server...

 

Error in expression <icle _weed;
[_objectID,_objectUID] call server_deleteObj;
_weed setDamage 1;
pla>
  Error position: <server_deleteObj;
_weed setDamage 1;
pla>
  Error Undefined variable in expression: server_deleteobj
File mpmissions\__CUR_MP.Chernarus\scripts\hemp.sqf, line 31
Error in expression <lse {Flare attachTo [player,[0,0,0.]];}
ppe2 = ppEffectCreate ["chromAberration">
  Error position: <ppe2 = ppEffectCreate ["chromAberration">
  Error Missing ;
File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31
Error in expression <lse {Flare attachTo [player,[0,0,0.]];}
ppe2 = ppEffectCreate ["chromAberration">
  Error position: <ppe2 = ppEffectCreate ["chromAberration">
  Error Missing ;
File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31

 

here´s the hemp.sqf  

  Reveal hidden contents

 

here´s the smokeshit.sqf

  Reveal hidden contents

for future reference when you have an RPT error and you're posting here for help, it

 

Now. In the smokeshit.sqf

if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}

There's a period after the last zero that shouldn't be there

and the same here

else {Flare attachTo [player,[0,0,0.]];}

Also the problems I mentioned with this script earlier still exist. Try copy pasting one of the fixes we tried earlier and get rid of the periods after the zeroes like I did above

Try this

  Reveal hidden contents

 

As for the hemp.sqf just use this.

  Reveal hidden contents

Link to comment
Share on other sites

both new files you given dont work.

now i even cant harvest with right click on plant, nor i can smoke it...

error msg directly appears when i try to right click on hemp or knife

File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31
Error in expression <else {Flare attachTo [player,[0,0,0]];}
ppe2 = ppEffectCreate ["chromAberration">
  Error position: <ppe2 = ppEffectCreate ["chromAberration">
  Error Missing ;
File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31 
Link to comment
Share on other sites

  On 3/15/2015 at 5:19 PM, cheech said:

both new files you given dont work.

now i even cant harvest with right click on plant, nor i can smoke it...

error msg directly appears when i try to right click on hemp or knife

File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31
Error in expression <else {Flare attachTo [player,[0,0,0]];}
ppe2 = ppEffectCreate ["chromAberration">
  Error position: <ppe2 = ppEffectCreate ["chromAberration">
  Error Missing ;
File mpmissions\__CUR_MP.Chernarus\scripts\smokeshit.sqf, line 31 

idk what you're doing wrong with the hemp.sqf then bud, it works perfectly fine on my server.

I dont know how to fix the smokeshit.sqf then. I dont use that script and I dont understand where it's missing the ;

Link to comment
Share on other sites

ok just for my understanding:

Are the plants stored in the database?

Are the plants spawned on server restart new and on random directions?

 

If the plant is not stored in the database, then there is no reason for this code:

hemp.sqf

[_objectID,_objectUID] call server_deleteObj;

other then that, its even missing some content and should give some errors.

 

BTW: Why there is not an option to cancel the farming process when moving? This could come in handy in some situations, just sayin' ^^

 

 

The missing ; is in line 30 after the last }

else {Flare attachTo [player,[0,0,0.]];} << here add a ;
Link to comment
Share on other sites

  On 3/15/2015 at 9:49 PM, SchwEde said:

 

ok just for my understanding:

Are the plants stored in the database?

Are the plants spawned on server restart new and on random directions?

 

If the plant is not stored in the database, then there is no reason for this code:

hemp.sqf

[_objectID,_objectUID] call server_deleteObj;

other then that, its even missing some content and should give some errors.

 

BTW: Why there is not an option to cancel the farming process when moving? This could come in handy in some situations, just sayin' ^^

 

 

The missing ; is in line 30 after the last }

else {Flare attachTo [player,[0,0,0.]];} << here add a ;

 I think the way he's using it, they spawn as "missions" around the map. Wouldnt that line of code delete the object after you've harvested it, so you can't continue harvesting the same plant indefinitely?

Link to comment
Share on other sites

  On 3/15/2015 at 9:49 PM, SchwEde said:

ok just for my understanding:

Are the plants stored in the database?

Are the plants spawned on server restart new and on random directions?

 

If the plant is not stored in the database, then there is no reason for this code:

hemp.sqf

[_objectID,_objectUID] call server_deleteObj;
other then that, its even missing some content and should give some errors.

 

BTW: Why there is not an option to cancel the farming process when moving? This could come in handy in some situations, just sayin' ^^

 

 

The missing ; is in line 30 after the last }

else {Flare attachTo [player,[0,0,0.]];} << here add a ;

Nice one SchwEde, congrats, the missing ; was it!

Which plants u mean, the fiberplant, or the kilohemp?

None of these seems to be in my database. i have commented the line out.

the script runs now, but the only thing i see is the smoke of a green flare.

2015_03_16_00004.jpg

also if i join as normal player, i get directly banned..why?

i really like to see those effects. would that ever be possible???

b7igk6.jpg

Link to comment
Share on other sites

well if the fiberplants are spawned from the server it could be that every player can harvest the plant once, so equal amount of hemp for everybody?! ^^

 

the right command to delete this from every client is this:

	if (isServer) then {
		PVDZE_obj_Delete call server_deleteObj;
	} else {
		PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
		publicVariableServer "PVDZE_obj_Delete";
	};

=============================

For you bans: Are you using any kind of antihack? If so check the logs or post your RPT

Link to comment
Share on other sites

there are still some errors left:

 

if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];} << 0. not a clever value
else {Flare attachTo [player,[0,0,0.]];} << missing ; at the end. same thing here with the 0.
 
why not attach the smoke to the head instead of to the gound?!
 
if (vehicle player != player) then { Flare attachTo [(vehicle player)];}
		else {Flare attachTo [player,[0,0,1.7]];}; //maybe +- 0.2 to get the right value for the head

 PS: Sry for the double post

Link to comment
Share on other sites

the script runs good, we use only random spawns, not a special mission, which i like to have next. a good fibreplant plantage next to static ai´s.

the only thing left is:

how to get those effects as shown above???

not only the green flare...

btw, how can i disable that flare?

Link to comment
Share on other sites

  On 3/17/2015 at 8:32 AM, SchwEde said:

to get rid of the smoke just remove this part of the code:

Flare = "SmokeShellGreen" createVehicle position player;
		if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
		else {Flare attachTo [player,[0,0,0.]];}
The effects should be visible if you have ppeffects enabled in your Video Options

Yeah, you´re the greatest, SchwEde!

From what should i knew else that those ppe´s have to enabled first...LOL

now the effects working as i like to have em:D

for the kicks, i have to relog as normal player and check my logs..

million thanks! now the odysse is over after almost 3 weeks ;-)

2202788.jpg

Link to comment
Share on other sites

the ban / kick happens only to non admin players when using the smokegrenade in that script...

when i comment it out, all is fine...

 

12:03:35 "infiSTAR.de Log: TeeBee303 (0000000000) | BadVar 2: Flare"
2015/03/17, 12:03:35 "["PVAHR_0_hhcuyrt_299581",["TeeBee303","00000000000000000","BAN",[66,97,100,86,97,114,32,50,58,32,70,108,97,114,101]]]"
2015/03/17, 12:03:35 "infiSTAR.de Log: SERVER kicked TeeBee303(00000000000000000) @062075"
2015/03/17, 12:03:35 "infiSTAR.de PlayerDisconnected: _uid: 00000000000000000 _name: TeeBee303"
2015/03/17, 12:03:35 "TeeBee303 | PlayerUID: 00000000000000000 CharacterID: 276 | Disconnected near Storage Unit @062075 | Resync Gear to prevent duping!"
2015/03/17, 12:03:35 "get: STRING (00000000000000000), sent: STRING (00000000000000000)"
2015/03/17, 12:03:35 "DISCONNECT: TeeBee303 (00000000000000000) Object: B 1-1-C:1 (TeeBee303) REMOTE, _characterID: 276 at loc [6287.35,7811.21,0.00146484]"
2015/03/17, 12:03:35 Client: Remote object 3:7 not found
2015/03/17, 12:03:35 Warning: Cleanup player - person 3:4 not found
Seems to be an BE Filter Thing, but no clue how to fix it...

maybe i leave it disabled ;-)

or its just an insert in some infistar file?

Link to comment
Share on other sites

  • 4 weeks later...
  On 4/10/2015 at 6:15 PM, blayr said:

Well, its a pretty simple instruction and you cant do much wrong. :D

And I am not using any antihack, yet.

 

but thank you for your fast answer.

 

i just love how people always assume it must be something wrong with the script if they cant get it to work ...

 

the script works perfectly fine btw ... show us your init and or rpt errors or we cant help you

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...