Quantcast

Jump to content

» «
Photo

Weapon Dealer CLEO error

2 replies to this topic
TMBoss
  • TMBoss

    Player Hater

  • Members
  • Joined: 16 Aug 2013

#1

Posted 28 August 2013 - 04:59 PM

Hi! I'm from poland and i sorry for my english. I do mod for GTA in the near cj-house and will be arms dealer. far I have written something like this:

{$ CLEO. Cs}
0000: NOP

Model.Load (# WBDYG2)
$ WBDYG2X = 2445.4924
$ WBDYG2Y = -1760.8005
$ WBDYG2Z = 13.5877
$ SPHERE_BUY_X = 2445.4893
$ SPHERE_BUY_Y = -1762.5322
$ SPHERE_BUY_Z = 13.5875
038B: load_requested_models

: Dealer
2 @ = Actor.Create (CivMale, # WBDYG2, $ WBDYG2X, $ WBDYG2Y, $ WBDYG2Z)
Actor.Angle (2 @) = 181.6858
01B2: give_actor 2 @ weapon 29 ammo 60 / / Load the weapon model before using this

: Car
014B: $ KCS = init_parked_car_generator # URANUS color 0 0 1 alarm 0 door_lock 0 0 10000 at 2449.4368 -1761.5959 13.1094 angle 179.5789
014C: KCS cars_to_generate_to set_parked_car_generator $ 101

: Handlarz_2
03BC: 8 @ = create_sphere_at SPHERE_BUY_X $ $ $ SPHERE_BUY_Y SPHERE_BUY_Z radius 1.0

0A93: end_custom_thread

I figure I want to spawn does not appear in the point at which it why have set? give me, where I have a problem. I promise I'll finish the mod as I share it with you.

Node
  • Node

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#2

Posted 29 August 2013 - 11:25 PM

CODE
{$ CLEO}
0000:

Model.Load (#WBDYG2)
038B: load_requested_models

$WBDYG2X = 2445.4924
$WBDYG2Y = -1760.8005
$WBDYG2Z = 13.5877
$SPHERE_BUY_X = 2445.4893
$SPHERE_BUY_Y = -1762.5322
$SPHERE_BUY_Z = 13.5875

:Dealer
2@ = Actor.Create(CivMale, # WBDYG2, $ WBDYG2X, $ WBDYG2Y, $ WBDYG2Z)
Actor.Angle (2 @) = 181.6858
01B2: give_actor 2 @ weapon 29 ammo 60 / / Load the weapon model before using this

:Car
014B: $ KCS = init_parked_car_generator # URANUS color 0 0 1 alarm 0 door_lock 0 0 10000 at 2449.4368 -1761.5959 13.1094 angle 179.5789
014C: KCS cars_to_generate_to set_parked_car_generator $ 101

:Handlarz_2
03BC: 8 @ = create_sphere_at SPHERE_BUY_X $ $ $ SPHERE_BUY_Y SPHERE_BUY_Z radius 1.0

0A93: end_custom_thread


Tidied the code up.

Also, make sure the coords you're using aren't really far away from where CJ is spawning otherwise you'll need to add a check to create the Actor when CJ gets close.

  • abccba123 likes this

goodidea82
  • goodidea82

    SA Modder

  • Members
  • Joined: 13 Jun 2013
  • Germany

#3

Posted 01 September 2013 - 09:58 AM

I think there are several problems so I suggest to read the tutorial and further lessons. One general rule is, do not use global variables in cleo scripts (there are only a few exceptions where it is required to use global vars).




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users