Jump to content

Police weapons script


gtamoder1234

Recommended Posts

gtamoder1234

Hello everyone i found one intresting script for gta vice city https://gamemodding.com/en/gta-vice-city/scripts/51461-police-weapons-upgrade.html and i want to have similar script for gta san adreas but im new to cleo coding maybe there is a kind perso who could help

here is what i came with but it refuses to work and crashes after loading screen

 

 

// This file was decompiled using SASCM.ini published on 2021-07-05
{$CLEO .cs}
{$USE ini}


// INI file script part

WAIT 1000 
IF and
  not READ_INT_FROM_INI_FILE 10@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "1_STAR"   // Weapon number
  not READ_INT_FROM_INI_FILE 11@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "1_STAR_GUN"  //Weapon Model ID
  not READ_INT_FROM_INI_FILE 12@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "2 STAR"   // Weapon number
  not READ_INT_FROM_INI_FILE 13@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "2_STAR_GUN"  //Weapon Model ID
  not READ_INT_FROM_INI_FILE 14@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "3_STAR"   // Weapon number
  not READ_INT_FROM_INI_FILE 15@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "3_STAR GUN"  //Weapon Model ID
GOTO_IF_FALSE @NONAME_389 
PRINT_STRING_NOW "FAIL TO READ 'CHANGE POLICE WEAPONS.INI'" time 10000 
TERMINATE_THIS_CUSTOM_SCRIPT 
GOTO @NONAME_767 

:NONAME_389
IF and
  not READ_INT_FROM_INI_FILE 16@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "4_STAR"   // Weapon number
  not READ_INT_FROM_INI_FILE 17@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "4_STAR GUN"  //Weapon Model ID
  not READ_INT_FROM_INI_FILE 18@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "5_STAR"   // Weapon number
  not READ_INT_FROM_INI_FILE 19@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "5_STAR GUN"  //Weapon Model ID
  not READ_INT_FROM_INI_FILE 20@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "6_STAR"   // Weapon number
  not READ_INT_FROM_INI_FILE 21@ section "CLEO\CHANGE POLICE WEAPONS.INI" key "FOOT" store_to "6_STAR GUN"  //Weapon Model ID
GOTO_IF_FALSE @NONAME_767 
PRINT_STRING_NOW "FAIL TO READ 'CHANGE POLICE WEAPONS.INI'" time 10000 
TERMINATE_THIS_CUSTOM_SCRIPT 



//Weapon Change Script Part


:NONAME_767
WAIT 200 
IF 
STORE_WANTED_LEVEL $PLAYER_CHAR store_to 0@ 
IF 
  not 0@ == 1 
GOTO_IF_FALSE @NONAME_957 
IF 
  not 0@ == 2 
GOTO_IF_FALSE @NONAME_1004 
IF 
  not 0@ == 3 
GOTO_IF_FALSE @NONAME_1051 
IF 
  not 0@ == 4 
GOTO_IF_FALSE @NONAME_1098 
IF 
  not 0@ == 5 
GOTO_IF_FALSE @NONAME_1145 
IF 
  not 0@ == 6 
GOTO_IF_FALSE @NONAME_1192 
IF 
  0@ == 0 
GOTO_IF_FALSE @NONAME_910 

:NONAME_910
REQUEST_MODEL 11@ 
LOAD_ALL_MODELS_NOW 
WRITE_MEMORY 6151373 size 1 value 10@ vp 1 
WRITE_MEMORY 6863799 size 1 value 10@ vp 1 
WAIT 1000 
GOTO @NONAME_767 

:NONAME_957
REQUEST_MODEL 13@ 
LOAD_ALL_MODELS_NOW 
WRITE_MEMORY 6151373 size 1 value 12@ vp 1 
WRITE_MEMORY 6863799 size 1 value 12@ vp 1 
WAIT 1000 
GOTO @NONAME_767 

:NONAME_1004
REQUEST_MODEL 15@ 
LOAD_ALL_MODELS_NOW 
WRITE_MEMORY 6151373 size 1 value 14@ vp 1 
WRITE_MEMORY 6863799 size 1 value 14@ vp 1 
WAIT 1000 
GOTO @NONAME_767 

:NONAME_1051
REQUEST_MODEL 17@ 
LOAD_ALL_MODELS_NOW 
WRITE_MEMORY 6151373 size 1 value 16@ vp 1 
WRITE_MEMORY 6863799 size 1 value 16@ vp 1 
WAIT 1000 
GOTO @NONAME_767 

:NONAME_1098
REQUEST_MODEL 19@ 
LOAD_ALL_MODELS_NOW 
WRITE_MEMORY 6151373 size 1 value 18@ vp 1 
WRITE_MEMORY 6863799 size 1 value 18@ vp 1 
WAIT 1000 
GOTO @NONAME_767 

:NONAME_1145
REQUEST_MODEL 21@ 
LOAD_ALL_MODELS_NOW 
WRITE_MEMORY 6151373 size 1 value 20@ vp 1 
WRITE_MEMORY 6863799 size 1 value 20@ vp 1 
WAIT 1000 
GOTO @NONAME_767 

:NONAME_1192
REQUEST_MODEL 11@ 
LOAD_ALL_MODELS_NOW 
WRITE_MEMORY 6151373 size 1 value 10@ vp 1 
WRITE_MEMORY 6863799 size 1 value 10@ vp 1 
WAIT 1000 
GOTO @NONAME_767 

 

 


 

 

Edited by gtamoder1234
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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