CLEO Help Tazer

CLEO related
Status
Not open for further replies.

Zin

Expert
Joined
Aug 1, 2013
Messages
1,738
Solutions
2
Reaction score
117
Hey i have not made a cleo in a long time but i want to make my own tazer mod for singleplayer.

I want it so when the player types TAZER they get a tazer and when they shoot someone they freeze for 8 seconds and get up with 50 HP.

Im getting "model.load unknown directive error"

code :
Code:
{$CLEO .cs}
THREAD 'ZinTaze'
:ACT
model.load (#SILENCED)
wait 0
if and
0ADC:   test_cheat "TAZER"
0AD2: 1@ = player $PLAYER_CHAR targeted_actor //IF and SET
else_jump @ACT
jump @TAZE





:TAZE
01B2: give_actor $PLAYER_ACTOR weapon 23 ammo 9999 // Load the weapon model before using this
04ED: load_animation  "CRACK"
if and
04EE:   animation "CRACK" loaded
0491:   actor $PLAYER_ACTOR has_weapon 23
0AB0:   key_pressed 1
else_jump @TAZE
0812: AS_actor 1@ perform_animation "crckdeth" IFP "CRACK" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 5000  // versionB
0223: set_actor 1@ health_to 50
jump @ACT
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Code:
{$CLEO .cs}

Model.load(#SILENCED)
04ED: load_animation "CRACK"

:ACTIVATION
wait 0
if
0ADC: "TAZER"
jf @ACTIVATION  
print "TAZER LOADED" 2000
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, 23, 999999999)

:MAIN
wait 0
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
jf @MAIN
if
056D:   actor 0@ defined
jf @MAIN
if and
02E0:   actor $PLAYER_actor firing_weapon
02D8:   actor $PLAYER_actor current_weapon == 23
jf @MAIN
1@ = Actor.Health(0@)
if
8029:   1@ >= 50
jf @CONTINUE
Actor.Health(0@) = 50

:CONTINUE
0812: AS_actor 0@ perform_animation "crckdeth1" IFP "CRACK" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 8000  // versionB
print "TAZER USED ~N~TYPE ~R~TAZER ~W~AGAIN TO RELOAD" 2000
goto @ACTIVATION
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,738
Solutions
2
Reaction score
117
Im getting more unkown directives with some of the opcodes like print and actor.giveweaponandammo

Do i need like some new sanny builder data files?
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,738
Solutions
2
Reaction score
117
The code works now but how come those actor.giveweaponandammo and model.load stuff are not in my opcode searcher
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Classes are not in opcode searcher. That's why it's called OPCODE searcher, you can find only opcodes there.
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Write "Actor." in SB then delete it and you should get a list with all classes and keywords like that:
SgTGce1.png
 
Status
Not open for further replies.
Top