Orto_Dogge Posted March 13 Share Posted March 13 Hi! For some reason the simple pickup check doesn't work for me. I tried multiple times in different variations, but here's the example of the simplest one: Spoiler // This file was decompiled using SASCM.ini published on 2021-07-05 {$CLEO .cs} script_name 'PICKUP' :MAIN_CHECK wait 0 if and Player.Defined($PLAYER_CHAR) 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 871.5042 -35.9287 63.1953 radius 200.0 200.0 200.0 else_jump @MAIN_CHECK Model.Load(#drug_white) 038B: load_requested_models Pickup.Create([email protected], #drug_white, 3, 871.5042, -35.9287, 63.1953) :REWARD wait 0 if 0214: pickup [email protected] picked_up else_jump @REWARD 0ACE: show_formatted_text_box "IT WORKED" Player.Money($PLAYER_CHAR) +=25000 jump @REWARD I fail to see what is wrong with my code and why it doesn't work. When I pick the pickup there is no message and no money. Can anyone please explain how the opcode should be used? Thanks. Link to comment Share on other sites More sharing options...
vladvo Posted March 13 Share Posted March 13 (edited) You are using variable [email protected] [email protected] and [email protected] are TIMERA and TIMERB - internal game timers. Replace [email protected] with [email protected] and you'll be fine. Edited March 13 by vladvo OrionSR, JohnDoe4444 and Orto_Dogge 3 Link to comment Share on other sites More sharing options...
Orto_Dogge Posted March 13 Author Share Posted March 13 19 minutes ago, vladvo said: You are using variable [email protected] [email protected] and [email protected] are TIMERA and TIMERB - internal game timers. Replace [email protected] with [email protected] and you'll be fine. Oh my God, I never would have guessed. Thanks a lot, it worked! Link to comment Share on other sites More sharing options...
vladvo Posted March 13 Share Posted March 13 28 minutes ago, Orto_Dogge said: Oh my God, I never would have guessed. Thanks a lot, it worked! From https://docs.sannybuilder.com/coding/variables Timer Variables Timer Variables Each script or a mission have 2 special local variables called TIMERA and TIMERB. The value of a timer variable is increased automatically when the game clock advances, so they are commonly used to measure time elapsed since the timer reset: 0006: TIMERA = 0 // reset the timer :WAIT_2S 0001: wait 0 ms 00D6: if 0019: TIMERA > 2000 // if the timer value is > 2000, i.e. 2 seconds has passed 004D: jump_if_false @WAIT_2S 0662: printstring "2 seconds has passed" // display the message TIMERA and TIMERB names are only available starting with Sanny Builder v3.3.0. In older scripts the timers are known as [email protected], [email protected] (GTA3, VC) or [email protected], [email protected] (SA). Orto_Dogge 1 Link to comment Share on other sites More sharing options...