Is the car lights server sided? You can use opcode 067F:i want a script to press CTRL (one time) for me when i enter the vehicle
(because i want my car lights to turn on automatically)
067F: set_car 0@ lights true
I want a script that presses automatically ctrl when i enter a vehicleIs the car lights server sided? You can use opcode 067F:
Code:067F: set_car 0@ lights true
if 31@ == 1
if Actor.Driving($PLAYER_ACTOR)
then
if 14@ == 1
then
wait 500
018C: play_sound 1056 at 0 0 0
0AF9: samp say_msg "/ph"
14@ = 0
end
else
14@ = 1
end
end
I want a script that presses automatically ctrl when i enter a vehicle
like this, but with key press
can u make it for me? I'm noob, i can't make a script from 0
Code:if 31@ == 1 if Actor.Driving($PLAYER_ACTOR) then if 14@ == 1 then wait 500 018C: play_sound 1056 at 0 0 0 0AF9: samp say_msg "/ph" 14@ = 0 end else 14@ = 1 end end
{$CLEO .cs}
0000: AUTO-CTRL, requires SAMPFUNCS
while true
wait 0
if 00DF: actor $PLAYER_ACTOR driving
then
0C72: set_virtual_key 17 down true // hold CTRL key down
wait 0
0C72: set_virtual_key 17 down false // release CTRL key
while 00DF: actor $PLAYER_ACTOR driving
wait 0
end
end
end
By the looks of it, you seems to have SAMPFUNCS with you, that makes it easier to make your goal possible:
Code:{$CLEO .cs} 0000: AUTO-CTRL, requires SAMPFUNCS while true wait 0 if 00DF: actor $PLAYER_ACTOR driving then 0C72: set_virtual_key 17 down true // hold CTRL key down wait 0 0C72: set_virtual_key 17 down false // release CTRL key while 00DF: actor $PLAYER_ACTOR driving wait 0 end end end
This script presses the CTRL key one time, every time your actor starts driving any vehicle.
{$CLEO .cs}
0000: AUTO-CTRL by ajom
while true
wait 0
if 00DF: actor $PLAYER_ACTOR driving
then
0AB1: @Set_Virtual_Key 2 _KeyOffSet 0x125 _time 250 // hold CTRL key for 0.25 seconds
while 00DF: actor $PLAYER_ACTOR driving
wait 0
end
end
end
:Set_Virtual_Key // ripped from Parazitas (http://ugbase.eu/index.php?threads/snippet-set-virtual-or-game-key.19933/)
// 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x125 time 800
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@ // (int)
0A8C: write_memory 2@ size 1 value 255 virtual_protect 0
wait 1@
0A8C: write_memory 2@ size 1 value 0 virtual_protect 0
0AB2: ret 0
Without SAMPFUNCS:
Code:{$CLEO .cs} 0000: AUTO-CTRL by ajom while true wait 0 if 00DF: actor $PLAYER_ACTOR driving then 0AB1: @Set_Virtual_Key 2 _KeyOffSet 0x125 _time 250 // hold CTRL key for 0.25 seconds while 00DF: actor $PLAYER_ACTOR driving wait 0 end end end :Set_Virtual_Key // ripped from Parazitas (http://ugbase.eu/index.php?threads/snippet-set-virtual-or-game-key.19933/) // 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x125 time 800 2@ = 0xB72CC8 0@ *= 2 005A: 2@ += 0@ // (int) 0A8C: write_memory 2@ size 1 value 255 virtual_protect 0 wait 1@ 0A8C: write_memory 2@ size 1 value 0 virtual_protect 0 0AB2: ret 0
{$CLEO}
0662: "Jakerly"
thread "smecherie"
wait 2500
const
COLOR = 0xFFE3336D
end
// 31@ = 0
0B12: 31@ = 31@ XOR 1
13@ = 1
23@ = 0
alloc 24@ 1024
////////////////////comenzi/////////////////////////////////
018C: play_sound 1147 at 0 0 0
0B34: samp register_client_command "jakerly" to_label @cmd_1
0B34: samp register_client_command ".cc" to_label @cmd_2
while true
wait 0
//////////////////////dialoguri//////////////////////////////////////////////////
chatmsg "{ffffff} PROJECT {ba8406}CLEO MODS {ff00ff}By JAKERLY {00ff1a}loaded!" -1
chatmsg "{ffffff} [HELP]{00fff2}Foloseste comanda{ff00ff}/jakerly {00fff2}pentru a vedea mai multe informatii. " -1
chatmsg "{ffffff} foloseste /.cc pentru a da clear la chat!"
/////////////////////////////done////////////////////////////////////////////////
:cmd_jakerly
WAIT 0
FOR 22@ = 0 to 999
IF SAMP.IsPlayerConnected(22@)
THEN
IF 1@ = SAMP.GetActorHandleByPlayerID(22@)
THEN
16@ = SAMP.GetPlayerColor(22@)
IF 16@ == COLOR
THEN
23@ += 1
END
END
END
END
if 31@ == 1
if Actor.Driving($PLAYER_ACTOR)
then
if 14@ == 1
then
wait 500
018C: play_sound 1056 at 0 0 0
0AF9: samp say_msg "/ph"
14@ = 0
end
else
14@ = 1
end
end
if 0B21: samp is_chat_opened
then
jump @cmd_jakerly
else
if key_down 71
then
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
end
end
if key_down 88
then
if 0B21: samp is_chat_opened
then
jump @cmd_jakerly
else
if 8@ == 0
then
8@ = 1
0AF9: samp say_msg "/stopanim" 5@
end
end
else
if 8@ == 2
then
0000:
else
8@ = 0
end
end
jump @cmd_jakerly
:cmd_1
SAMP.IsCommandTyped(20@)
chatmsg "{ffffff}MODS: {9e9e9e}auto PH, auto LIGHTS, auto M4, stopanim on X, clear chat /.cc" -1
chatmsg "{7289da}CONTACT INFO: Jakerly#1101 (Update-uri pe viitor, puteti sa-mi lasati idei!)" -1
SAMP.CmdRet()
:cmd_2
SAMP.IsCommandTyped(20@)
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "{FF0000}(Administrator MOD): {ff00ff}Jakerly {FFFFFF}used /.cc!" -1
SAMP.CmdRet()
i tried to paste your script in my cleo mod, but chat spams me with chatmsg and other scripts wont work
cuz i dont know where i can paste your script and adapt it to work.
i tried to paste your script in my cleo mod, but chat spams me and other scripts wont work
cuz i dont know how to paste it and adapt..
Code:while true wait 0
// makes the script totally useless
while true
wait 0
end
{$CLEO}
0662: "Jakerly"
thread "smecherie"
wait 2500
const
COLOR = 0xFFE3336D
end
// 31@ = 0
0B12: 31@ = 31@ XOR 1
13@ = 1
23@ = 0
alloc 24@ 1024
////////////////////comenzi/////////////////////////////////
018C: play_sound 1147 at 0 0 0
0B34: samp register_client_command "jakerly" to_label @aboutscript
0B34: samp register_client_command ".cc" to_label @clearchat
//////////////////////dialoguri//////////////////////////////////////////////////
chatmsg "{ffffff} PROJECT {ba8406}CLEO MODS {ff00ff}By JAKERLY {00ff1a}loaded!" -1
chatmsg "{ffffff} [HELP]{00fff2}Foloseste comanda{ff00ff}/jakerly {00fff2}pentru a vedea mai multe informatii. " -1
chatmsg "{ffffff} foloseste /.cc pentru a da clear la chat!"
/////////////////////////////done////////////////////////////////////////////////
:cmd_jakerly
WAIT 0
FOR 22@ = 0 to 999
IF SAMP.IsPlayerConnected(22@)
THEN
IF 1@ = SAMP.GetActorHandleByPlayerID(22@)
THEN
16@ = SAMP.GetPlayerColor(22@)
IF 16@ == COLOR
THEN 23@ += 1
END
END
END
END
if 31@ == 1
then
if 00DF: actor $PLAYER_ACTOR driving // credits to ajom
then
0AB1: @Set_Virtual_Key 2 _KeyOffSet 0x125 _time 250 // hold CTRL key for 0.25 seconds
while 00DF: actor $PLAYER_ACTOR driving // waits indefinetly until actor is not inside the car anymore
wait 0
end
end
end
if 0B21: samp is_chat_opened
then jump @cmd_jakerly
else
if key_down 71
then 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
end
end
if key_down 88
then
if 0B21: samp is_chat_opened
then jump @cmd_jakerly
else
if 8@ == 0
then
8@ = 1
0AF9: samp say_msg "/stopanim" 5@
end
end
else
if 8@ == 2
then 0000: nop??? why???
else 8@ = 0
end
end
jump @cmd_jakerly
:Set_Virtual_Key // ripped from Parazitas (http://ugbase.eu/index.php?threads/snippet-set-virtual-or-game-key.19933/)
// 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x125 time 800
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@ // (int)
0A8C: write_memory 2@ size 1 value 255 virtual_protect 0
wait 1@
0A8C: write_memory 2@ size 1 value 0 virtual_protect 0
0AB2: ret 0
:aboutscript
SAMP.IsCommandTyped(20@)
chatmsg "{ffffff}MODS: {9e9e9e}auto PH, auto LIGHTS, auto M4, stopanim on X, clear chat /.cc" -1
chatmsg "{7289da}CONTACT INFO: Jakerly#1101 (Update-uri pe viitor, puteti sa-mi lasati idei!)" -1
SAMP.CmdRet()
:clearchat
SAMP.IsCommandTyped(20@)
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "" -1
chatmsg "{FF0000}(Administrator MOD): {ff00ff}Jakerly {FFFFFF}used /.cc!" -1
SAMP.CmdRet()
Thank you, works, but you deleted auto /ph, this thing puts helmet when i drive a motorcycle, but i resolved it. Works lights and auto /phYour script was stuck in an infinite loop and cannot escape:
That is equivalent to:
Code:// makes the script totally useless while true wait 0 end
This might be the script you are trying to accomplish:
Code:{$CLEO} 0662: "Jakerly" thread "smecherie" wait 2500 const COLOR = 0xFFE3336D end // 31@ = 0 0B12: 31@ = 31@ XOR 1 13@ = 1 23@ = 0 alloc 24@ 1024 ////////////////////comenzi///////////////////////////////// 018C: play_sound 1147 at 0 0 0 0B34: samp register_client_command "jakerly" to_label @aboutscript 0B34: samp register_client_command ".cc" to_label @clearchat //////////////////////dialoguri////////////////////////////////////////////////// chatmsg "{ffffff} PROJECT {ba8406}CLEO MODS {ff00ff}By JAKERLY {00ff1a}loaded!" -1 chatmsg "{ffffff} [HELP]{00fff2}Foloseste comanda{ff00ff}/jakerly {00fff2}pentru a vedea mai multe informatii. " -1 chatmsg "{ffffff} foloseste /.cc pentru a da clear la chat!" /////////////////////////////done//////////////////////////////////////////////// :cmd_jakerly WAIT 0 FOR 22@ = 0 to 999 IF SAMP.IsPlayerConnected(22@) THEN IF 1@ = SAMP.GetActorHandleByPlayerID(22@) THEN 16@ = SAMP.GetPlayerColor(22@) IF 16@ == COLOR THEN 23@ += 1 END END END END if 31@ == 1 then if 00DF: actor $PLAYER_ACTOR driving // credits to ajom then 0AB1: @Set_Virtual_Key 2 _KeyOffSet 0x125 _time 250 // hold CTRL key for 0.25 seconds while 00DF: actor $PLAYER_ACTOR driving // waits indefinetly until actor is not inside the car anymore wait 0 end end end if 0B21: samp is_chat_opened then jump @cmd_jakerly else if key_down 71 then 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31 end end if key_down 88 then if 0B21: samp is_chat_opened then jump @cmd_jakerly else if 8@ == 0 then 8@ = 1 0AF9: samp say_msg "/stopanim" 5@ end end else if 8@ == 2 then 0000: nop??? why??? else 8@ = 0 end end jump @cmd_jakerly :Set_Virtual_Key // ripped from Parazitas (http://ugbase.eu/index.php?threads/snippet-set-virtual-or-game-key.19933/) // 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x125 time 800 2@ = 0xB72CC8 0@ *= 2 005A: 2@ += 0@ // (int) 0A8C: write_memory 2@ size 1 value 255 virtual_protect 0 wait 1@ 0A8C: write_memory 2@ size 1 value 0 virtual_protect 0 0AB2: ret 0 :aboutscript SAMP.IsCommandTyped(20@) chatmsg "{ffffff}MODS: {9e9e9e}auto PH, auto LIGHTS, auto M4, stopanim on X, clear chat /.cc" -1 chatmsg "{7289da}CONTACT INFO: Jakerly#1101 (Update-uri pe viitor, puteti sa-mi lasati idei!)" -1 SAMP.CmdRet() :clearchat SAMP.IsCommandTyped(20@) chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "" -1 chatmsg "{FF0000}(Administrator MOD): {ff00ff}Jakerly {FFFFFF}used /.cc!" -1 SAMP.CmdRet()
Without SAMPFUNCS:
Code:{$CLEO .cs} 0000: AUTO-CTRL by ajom while true wait 0 if 00DF: actor $PLAYER_ACTOR driving then 0AB1: @Set_Virtual_Key 2 _KeyOffSet 0x125 _time 250 // hold CTRL key for 0.25 seconds while 00DF: actor $PLAYER_ACTOR driving wait 0 end end end :Set_Virtual_Key // ripped from Parazitas (http://ugbase.eu/index.php?threads/snippet-set-virtual-or-game-key.19933/) // 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x125 time 800 2@ = 0xB72CC8 0@ *= 2 005A: 2@ += 0@ // (int) 0A8C: write_memory 2@ size 1 value 255 virtual_protect 0 wait 1@ 0A8C: write_memory 2@ size 1 value 0 virtual_protect 0 0AB2: ret 0