E-mail Posted September 15, 2011 Share Posted September 15, 2011 Hi guys when the images say have to be in UTF-8?? see the client side .... local CrouchImg = guiCreateStaticImage ( 0.005, 0.74, 0.055, 0.075,"2.png", true) local WeapSts = 0 function ACB_onClientPlayerWeaponFireFunction( ) if WeapSts == 0 then WeapSts = 1 toggleControl ( "crouch",false ) toggleControl ( "sprint",false ) guiStaticImageLoadImage ( CrouchImg,"1.png" ) setTimer ( ACB_Timer, 425,1 ) end end addEventHandler ( "onClientPedWeaponFire", getRootElement(),ACB_onClientPlayerWeaponFireFunction ) function ACB_Timer() toggleControl ( "crouch",true ) toggleControl ( "sprint",true ) guiStaticImageLoadImage ( CrouchImg, "2.png" ) WeapSts = 0 end and /debugscript say C\1.png:1:'='expected near ' Link to comment
Castillo Posted September 15, 2011 Share Posted September 15, 2011 The script has no errors, are you sure it's the full script? Link to comment
TAPL Posted September 15, 2011 Share Posted September 15, 2011 local CrouchImg = guiCreateStaticImage ( 0.005, 0.74, 0.055, 0.075, "2.png", true) local WeapSts = 0 function ACB_onClientPlayerWeaponFireFunction( ) if WeapSts == 0 then WeapSts = 1 toggleControl ( "crouch",false ) toggleControl ( "sprint",false ) guiStaticImageLoadImage ( CrouchImg,"1.png" ) setTimer ( ACB_Timer, 425,1 ) end end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), ACB_onClientPlayerWeaponFireFunction ) function ACB_Timer() toggleControl ( "crouch",true ) toggleControl ( "sprint",true ) guiStaticImageLoadImage ( CrouchImg, "2.png" ) WeapSts = 0 end on the event i think you maybe should use getLocalPlayer() Instead getRootElement() Link to comment
Aibo Posted September 15, 2011 Share Posted September 15, 2011 1.png? did you put your image file in meta.xml as a script file? Link to comment
CapY Posted September 15, 2011 Share Posted September 15, 2011 Look for "File" tag here : https://wiki.multitheftauto.com/wiki/Meta.xml You can use this : <file src="yourimagename.png" /> To identify your image. Link to comment
BinSlayer1 Posted September 15, 2011 Share Posted September 15, 2011 also, guiStaticImageLoadImage doesn't work, wiki says "PLEASE NOTE: In 1.0, this function always returns false" It might just do the same in 1.1 too unless they fixed it Link to comment
Castillo Posted September 15, 2011 Share Posted September 15, 2011 BinSlayer, I used that function many times in 1.0 and in 1.1 I'd too if I remember well, has no problems. Link to comment
mjau Posted September 16, 2011 Share Posted September 16, 2011 im srry but noone iof you think the title i s funny "Bug in glitch system" Link to comment
NotAvailable Posted September 16, 2011 Share Posted September 16, 2011 Open -> Notepad ++ -> Click on Encoding -> Click UTF-8 -> Press Convert/Encode to UTF-8 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now