CLEO Help Cleo skin mod help

CLEO related
Status
Not open for further replies.

krokodiL!

Member
Joined
Feb 15, 2014
Messages
5
Reaction score
0
Code:
:NONAME_6
wait 0 
   SAMP.IsCommandTyped(0@)
0AD4: 4@ = scan_string 0@ format "%d" 1@  
else_jump @NONAME_2
wait 200
Model.Load(1@)
wait 200
038B: load_requested_models
wait 200 
09C7: change_player $PLAYER_CHAR model_to 1@

So I have this code, I didn't copy the whole script but I loaded Samp functions. I made a command /skinset and basically I want if I type /skinset 120 the script sets me the model of the skin 120. With my current script when I type the command my game freezes. I looked in the chatlog because I added "samp add_message_to_chat" and I saw in chatlog that it spams the message. What's wrong?
 

krokodiL!

Member
Joined
Feb 15, 2014
Messages
5
Reaction score
0
pepeelpubero link said:
I think because there is not a right model and u must add a command.

I actually fixed that with skin, but I have that problem with this:

Code:
if 
  8AF7: get_samp_base_to 29@
then 
    0A93: end_custom_thread
end
repeat 
    wait 400
until 0AFA: is_samp_structures_available

0B34: samp register_client_command "armor" to_label @NONAME_2

:NONAME_2
/*wait 0 
if
0ADC:   test_cheat "ARMOR" 
else_jump @NONAME_3*/ 
wait 0
if 
SAMP.IsCommandTyped(0@)
else_jump @NONAME_3
if
0AD4: 4@ = scan_string 0@ format "%d" 1@  
else_jump @NONAME_3
if 
   SAMP.IsPlayerConnected(1@)
else_jump @NONAME_3
22@ = SAMP.GetPlayerNickname(1@)
0AF8: samp add_message_to_chat "* Zastitar %s vam zeli prodati pancirku za 1$ - utipkajte (/accept armour) da prihvatite." color 10275414 22@
wait 5500
0AF8: samp add_message_to_chat "* Uspjesno ste kupili pancirku od zastitara %s za 1$." color 10275414 22@
Actor.AddArmour($PLAYER_ACTOR, 100)
SAMP.CmdRet

Don't bother with the jump to NONAME_3, I have that in the script, just didn't copy that because it works.

With this it simply freezes and it doesn't spam.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Code:
0B34: samp register_client_command "armor" to_label @ARMOR

while true
wait 0 
end //loop

:ARMOR
0B35: 0@ = last_params
if 0AD4: 4@ = scan_string 0@ format "%d" 1@ 
then
    if SAMP.IsPlayerConnected(1@)
    then 
        22@ = SAMP.GetPlayerNickname(1@)
        0AF8: samp add_message_to_chat "* Zastitar %s vam zeli prodati pancirku za 1$ - utipkajte (/accept armour) da prihvatite." color 10275414 22@
        wait 5500
        0AF8: samp add_message_to_chat "* Uspjesno ste kupili pancirku od zastitara %s za 1$." color 10275414 22@
        Actor.AddArmour($PLAYER_ACTOR, 100)
    end
end
0B43: cmd_ret
 

krokodiL!

Member
Joined
Feb 15, 2014
Messages
5
Reaction score
0
springfield link said:
Code:
0B34: samp register_client_command "armor" to_label @ARMOR

while true
wait 0 
end //loop

:ARMOR
0B35: 0@ = last_params
if 0AD4: 4@ = scan_string 0@ format "%d" 1@ 
then
    if SAMP.IsPlayerConnected(1@)
    then 
        22@ = SAMP.GetPlayerNickname(1@)
        0AF8: samp add_message_to_chat "* Zastitar %s vam zeli prodati pancirku za 1$ - utipkajte (/accept armour) da prihvatite." color 10275414 22@
        wait 5500
        0AF8: samp add_message_to_chat "* Uspjesno ste kupili pancirku od zastitara %s za 1$." color 10275414 22@
        Actor.AddArmour($PLAYER_ACTOR, 100)
    end
end
0B43: cmd_ret

Thanks, but it seems that the "wait 5500" doesn't work. It's a bit important for me, so if you could see that.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Code:
0B34: samp register_client_command "armor" to_label @ARMOR

while true
wait 0 
if 31@ == 1
then
    wait 5500
    0AF8: samp add_message_to_chat "* Uspjesno ste kupili pancirku od zastitara %s za 1$." color 10275414 22@
    Actor.AddArmour($PLAYER_ACTOR, 100)
    31@ = 0
end
end


:ARMOR
0B35: 0@ = last_params
if 0AD4: 4@ = scan_string 0@ format "%d" 1@ 
then
    if SAMP.IsPlayerConnected(1@)
    then 
        22@ = SAMP.GetPlayerNickname(1@)
        0AF8: samp add_message_to_chat "* Zastitar %s vam zeli prodati pancirku za 1$ - utipkajte (/accept armour) da prihvatite." color 10275414 22@
        31@ = 1
    end
end
0B43: cmd_ret
 
Status
Not open for further replies.
Top