Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
Jaskaran498

Player has two weapons by default

Recommended Posts

Jaskaran498

Hi

I finally learned a little top create scripts that can spawn things.

But i want to know the way to create script that wil give player two weapons by default (as soon as game starts) and weapons are-> Uzi and Dildo (nevermind...) without any key press.

But i just dont know what should i use and do.

Please help.

Edited by Jaskaran498

Share this post


Link to post
Share on other sites
UNRATED69

If you want to give an actor (the player in this instance) a weapon, first you have to load the model.

 

 

0247: load_model #SHOTGSPA

 

 

Next you should make sure the model is available. This can be done two ways.

 

By checking if it is available.

 

 

0248:   model #SHOTGSPA available 

 

 

Or by forcing the game to load the model.

 

 

load_requested_models 

 

 

Then you can give the weapon to the actor.

 

 

01B2: give_actor $PLAYER_ACTOR weapon 27 ammo 9999

 

 

And finally you should release the model once you are done with it.

 

 

0249: release_model #SHOTGSPA

 

Share this post


Link to post
Share on other sites
Jaskaran498

thanks dude.

 

But my game crashes... sad.gif

it seems like i am doing something wrong.

 

Can you please provide more details like how should i start/end etc. please cos i am noob in this case

Share this post


Link to post
Share on other sites
Michael-Knight1
thanks dude.

 

But my game crashes... sad.gif

it seems like i am doing something wrong.

 

Can you please provide more details like how should i start/end etc. please cos i am noob in this case

Use Like That .

 

{$CLEO}0000:0247: load_model #SHOTGSPA038B: load_requested_models while True   if      Player.Defined($PLAYER_CHAR)   then   if    0248:   model #SHOTGSPA available    then     01B2: give_actor $PLAYER_ACTOR weapon 27 ammo 9999     0249: release_model #SHOTGSPA   end // if   endend // while

 

 

Share this post


Link to post
Share on other sites
Silent

Ignore @up, it's wrong and it will crash freeze your game.

 

Ontopic: UNRATED69 explained it well - show your full code so we can find the error.

Share this post


Link to post
Share on other sites
Jaskaran498

Yes.

It freezes game.

MY script too is quite same. Except i didnt write this part-> Rest is same.

 

 

while True  if     Player.Defined($PLAYER_CHAR)  then  if

 

 

 

 

So, is that some wrong optcode "we" are using?

 

I actually took some idea from another script but it seems like i was wrong...

Edited by Jaskaran498

Share this post


Link to post
Share on other sites
Michael-Knight1
Yes.

It freezes game.

MY script too is quite same. Except i didnt write this part-> Rest is same.

 

 

while True  if     Player.Defined($PLAYER_CHAR)  then  if

 

 

 

 

So, is that some wrong optcode "we" are using?

 

I actually took some idea from another script but it seems like i was wrong...

the script which i give you is true but sorry , you just need to wait before while loop sleepy.gif

 

while True  wait 0  if     Player.Defined($PLAYER_CHAR)

 

Share this post


Link to post
Share on other sites
Jaskaran498

Ok.

Thanks dude.

I was able to give mp5 to player.

But how do i give dildo blush.gif ?

The model does not appear and does not shoot lightning sad.gif

Share this post


Link to post
Share on other sites
Silent

Look up for weapons' model names and IDs in Sanny's help.

Share this post


Link to post
Share on other sites
Jaskaran498

Yeah.

I know. I already tried that.

 

Model name-> GUN_DILDO2

Id-> (i forgot but i had inserted correct id).

 

Still, game turns on but no weapon is there.

 

Also, in previous script, even if weapon shows, say even if player gets shotspa, i cannot change weapon.

WHenever i try rolling mouse wheel, the weapon changes instantly to one in script only, no other weapon.

Please help.

Share this post


Link to post
Share on other sites
Node

{$CLEO}0000::1wait 0 if   Actor.Defined($PLAYER_ACTOR)jf @1 Model.Load(#GUN_DILDO1) Model.Load(#MICRO_UZI)038B: load_requested_models :2wait 0 if and  Model.Available(#GUN_DILDO1)  Model.Available(#MICRO_UZI)else_jump @2 01B2: give_actor $PLAYER_ACTOR weapon 10 ammo 999999 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 28 ammo 999999 // Load the weapon model before using this Model.Destroy(#GUN_DILDO1)Model.Destroy(#MICRO_UZI)end_thread 

 

 

Use this.

Edited by The_Sorrow

Share this post


Link to post
Share on other sites
Silent

end_thread is evil in CLEO. Use 0A93 instead.

Share this post


Link to post
Share on other sites
Jaskaran498

But it gives error while compiling "Unknown directive Actor.Defined($PLAYER_ACTOR)." sad.gif

Share this post


Link to post
Share on other sites
Michael-Knight1

 

But it gives error while compiling "Unknown directive Actor.Defined($PLAYER_ACTOR)." sad.gif

change with player defined .

 

Player.Defined($PLAYER_CHAR)

 

Share this post


Link to post
Share on other sites
Jaskaran498

Already tried it.

The game hangs at first cutscene (of game when new game is started).

My update->

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------0000: NOP :NONAME_2wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @NONAME_2 Model.Load(#GUN_DILDO1)Model.Load(#MICRO_UZI)038B: load_requested_models :NONAME_34wait 0 if and  Model.Available(#GUN_DILDO1)  Model.Available(#MICRO_UZI)else_jump @NONAME_34 01B2: give_actor $PLAYER_ACTOR weapon 10 ammo 999999 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 28 ammo 999999 // Load the weapon model before using this Model.Destroy(#GUN_DILDO1)Model.Destroy(#MICRO_UZI)end_thread 

 

 

Now what should i do? confused.gif

Share this post


Link to post
Share on other sites
Silent

 

end_thread (004E) is evil in CLEO. Use 0A93 instead.

Explained already.

Share this post


Link to post
Share on other sites
Node

Replace the last line:

 

 

End_thread

 

 

With:

 

 

0A93: end_custom_thread

 

Share this post


Link to post
Share on other sites
Jaskaran498

Ok.

Game starts fine.

But weapons are not given to player.

 

 

Ok. I see weapon of dildo but for a second and then it disappears with nothing left but simple punch sad.gif

Share this post


Link to post
Share on other sites
Michael-Knight1

 

Ok.

Game starts fine.

But weapons are not given to player.

 

 

Ok. I see weapon of dildo but for a second and then it disappears with nothing left but simple punch sad.gif

eh ! it work fine but anyways compile this one .

 

{$CLEO}0000:0247: load_model #GUN_DILDO10247: load_model #MICRO_UZI038B: load_requested_models while True  wait 0   if     Player.Defined($PLAYER_CHAR)  then  if   0248:   model #GUN_DILDO1 available    0248:   model #MICRO_UZI available   then    01B2: give_actor $PLAYER_ACTOR weapon 10 ammo 9999    01B2: give_actor $PLAYER_ACTOR weapon 28 ammo 9999    0249: release_model #GUN_DILDO1    0249: release_model #MICRO_UZI  end // if  endend // while

 

Share this post


Link to post
Share on other sites
Bad.boy!

It works, but it isn't correct.

Share this post


Link to post
Share on other sites
Jaskaran498

Yeah.

Weapon changing is not possible again. sad.gif

Share this post


Link to post
Share on other sites
Ashwin.Star

What the H,

Such a Small question & second Page !!!

 

you want a script which Gives UZI & Dildo weapon to the player,

for once at the Starting, (SA)

here it is

 

 

{$CLEO}thread 'Ashwin':1wait 0ifplayer.Defined($Player_Char)jf @1model.Load(#gun_dildo1)   model.Load(#micro_uzi)038B: load_requested_models wait 500  //<---- just for fun01B2: give_actor $Player_Actor weapon 28 ammo 50001B2: give_actor $Player_Actor weapon 10 ammo 1model.Destroy(#gun_dildo1)   model.Destroy(#micro_uzi)0A93: end_custom_thread 

 

 

i have open SB after a Break,

i hope everything is Right ...

Edited by Ashwin the new boy

Share this post


Link to post
Share on other sites
Jaskaran498

Thats the same problem again....

We only get weapon for a sec. after that it disappears.

 

Yeah. Its too simple for you guys seeing your experience. But then again why....?

Share this post


Link to post
Share on other sites
Ashwin.Star

May be any other script is removing your Weapons,

 

just for testing,

 

remove these lines

 

model.Destroy(#gun_dildo1)   model.Destroy(#micro_uzi)

 

 

& replace

 

wait 500

with

wait 5000

Share this post


Link to post
Share on other sites
Bad.boy!

The problem isn't the script, this problem occurs when 0992 is set.

 

0992: set_player $PLAYER_CHAR weapons_scrollable 0

 

 

You should make the weapons scrollable again, or use 01B9 to set the current weapon.

 

01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0

 

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.