CLEO Help Heeelp

CLEO related
Status
Not open for further replies.

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
this nigga script make me look mad

[shcode=cpp]     {$CLEO}
   
   :NONAME_02
   WAIT 0 MS
   
   :NONAME_03
   WAIT 0 MS
    IF 8AFA: NOT
      THEN JUMP @NONAME_03
   END
   
   0B34: Create Command "AgON" to @AgON label
   0B34: Create Command "SgM4" to @SgM4 label
   
   0C6A: 1@ = new thread at @AgON_WHILE label
   0C6a: 25@ = new thread at @SgM4_WHILE label
   
   :NONAME_04
   WAIT 0 MS
   JUMP @NONAME_04
   
   :AgON
   SAMP.IsCommandTyped(0@)
    IF 8AD4: NOT 1@ SCAN 0@ FORMAT "%D" 2@
      THEN JUMP @ERROR_AgON
   END
    IF 2@ == 1 
      THEN CHATMSG "Auto Accept Gun by Shanker & Rough activated. " -1
      $AGON = 1
    ELSE
    IF 2@ == 0
      THEN CHATMSG "Auto Accept Gun by Shanker & Rough deactivated. " -1
      $AGON = 0
    END
   END  
   SAMP.CmdRet
   
   :ERROR_AgON
   SAMP.CmdRet
   
   :AgON_WHILE
   WHILE TRUE
   WAIT 0 MS
      IF $AGON == 1
        THEN
        WHILE $AGON == 1
        WAIT 300 MS
        ALLOC 4@ = 260
        0B75: samp get_chat_string 99 text_to 4@ prefix_to 5@ color_to 6@ prefix_color_to 7@
         IF OR
         0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a M4 for %s Use (/accept gun %d)." 9@v 11@v 10@     
         0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Silenced Pistol for %s Use (/accept gun %d)." 9@v 11@v 10@      // THANKS TO Springfield BCS HE SHOWED ME HOW TO USE 0AD4
         0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Desert Eagle for %s Use (/accept gun %d)." 9@v 11@v 10@
         0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Shotgun for %s Use (/accept gun %d)." 9@v 11@v 10@
         0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a AK47 for %s Use (/accept gun %d)." 9@v 11@v 10@
         0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Rifle for %s Use (/accept gun %d)." 9@v 11@v 10@
            THEN
            SAY "/ag %s" 9@v
         END
         free 4@
         END
      END 
   END
   
   :SgM4
   $M4ON = 1
   SAMP.CmdRet
    
   
   :SgM4_WHILE
   WHILE TRUE
   WAIT 0 MS
     IF $M4ON == 1
       THEN
     FOR 12@ = 0 to 999
      IF SAMP.IsPlayerConnected(12@)
        THEN
        26@ = SAMP.GetActorHandleByPlayerID(12@)
        27@ = SAMP.GetActorHandleByPlayerID($PLAYER_ACTOR)    
        00A0: store_actor 27@ position_to 13@ 14@ 15@
        00A0: store_actor 26@ position_to 16@ 17@ 18@
        050A: 19@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 16@ 17@ 18@
         IF 8031: NOT 19@ >= 75.0
           THEN SAY "/sg %d M4 1" 12@
         END
         END 
         END
      END
   END  
   SAMP.CmdRet                
          
     [/shcode]

:SgM4 not working, when I write it in game, it crash my fkcing game.


I FOUND THE PROBLEM, for guys who wanna know what is wrong in :SgM4, actor must be streamed before you get his pos !

[shcode=cpp]:SgM4_WHILE
  WHILE TRUE
  WAIT 0 MS
    IF $M4ON == 1
      THEN
      FOR 12@ = 0 to 999
       IF SAMP.IsPlayerConnected(12@)
         THEN
         26@ = SAMP.GetActorHandleByPlayerID(12@)
           IF 056D:   actor 26@ defined
             THEN  
             00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 15@
             00A0: store_actor 26@ position_to 16@ 17@ 18@
             050A: 19@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 16@ 17@ 18@
              IF 8031: NOT 19@ >= 75.0
                THEN SAY "/sg %d M4 1" 12@
             END
             END
         END
         END
     END
  END  
  SAMP.CmdRet      
        [/shcode]

global $vars fck my others script but i dont have similary names, idk why
can some one show me how to use 0ab1 here? ( im telling you about [font=Consolas, Menlo, Monaco,]AgON_WHILE & AgON labels )[/font]

http://pastebin.com/8a7j9YfW
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
springfield said:
what you don't understand?

everything :O and yes + is not first time when im trying to learn it,

[shcode=cpp] :AgON
  SAMP.IsCommandTyped(0@)
   IF 8AD4: NOT 1@ SCAN 0@ FORMAT "%D" 2@
     THEN JUMP @ERROR_AgON
  END
   IF 2@ == 1
     THEN CHATMSG "Auto Accept Gun by Shanker & Rough activated. " -1
     28@ = 1
   ELSE
   IF 2@ == 0
     THEN CHATMSG "Auto Accept Gun by Shanker & Rough deactivated. " -1
     28@ = 0
   END
  END    
  SAMP.CmdRet
 
  :ERROR_AgON
  SAMP.CmdRet
 
  :AgON_WHILE
  WHILE TRUE
  WAIT 0 MS
     0ab1: @AgON 1 28@
     IF 28@ == 1
       THEN
       WHILE 28@ == 1
       WAIT 300 MS
       ALLOC 4@ = 260
       0B75: samp get_chat_string 99 text_to 4@ prefix_to 5@ color_to 6@ prefix_color_to 7@
        IF OR
        0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a M4 for %s Use (/accept gun %d)." 9@v 11@v 10@    
        0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Silenced Pistol for %s Use (/accept gun %d)." 9@v 11@v 10@      // THANKS TO Springfield BCS HE SHOWED ME HOW TO USE 0AD4
        0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Desert Eagle for %s Use (/accept gun %d)." 9@v 11@v 10@
        0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Shotgun for %s Use (/accept gun %d)." 9@v 11@v 10@
        0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a AK47 for %s Use (/accept gun %d)." 9@v 11@v 10@
        0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Rifle for %s Use (/accept gun %d)." 9@v 11@v 10@
           THEN
           SAY "/ag %s" 9@v
        END
        free 4@
        END
     END
     0ab2: ret 0
  END[/shcode]  it spam my fcking game with CHATMSG "Auto Accept Gun by Shanker & Rough activated. " -1
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
I don't understand anything from your script. It makes no sense and it's hard to understand/read.
Use this, and maybe use an example on how to make your script smaller and easier to read.

[shcode=cpp]
{$CLEO}
0000:

REPEAT
   WAIT 100
UNTIL 0AFA:
0B34: "agon" @agon

const
ACCGUN_STATE = 31@
end

WHILE TRUE
   WAIT 0    
   IF ACCGUN_STATE == TRUE
   THEN
       ALLOC 0@ = 145
       0B75: samp chat_string 99 text 0@ -1 -1 -1          
       IF OR
           0AD4: 1@ = scan 0@ fmt "* Arms Dealer %*s offered you a %*s for %*s Use (/accept gun %d)." 2@
           0AD4: 1@ = scan 0@ fmt "* Arms Dealer %*s offered you a %*s%*c%*s for %*s Use (/accept gun %d)." 2@
       THEN SAY "/ag %d" 2@
       END      
       FREE 0@
   END
END

:agon
0B12: ACCGUN_STATE = ACCGUN_STATE XOR 1
IF ACCGUN_STATE == TRUE
THEN CHATMSG "Auto Accept Gun {00FF00}ON" -1
ELSE CHATMSG "Auto Accept Gun {FF0000}OFF" -1
END
0B43:
[/shcode]
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
@springfield , i really don't understand why my scripts is hard to read for  you :)) ok i did just 1 while true i didn't used 0c6a new thread anymore,
[shcode=cpp]   {$CLEO}
                                   /* Credits: Springfield(Showed me how to use 0AD4) , Rough (Helper), Shanker */
  :NONAME_02
  WAIT 0 MS
 
  :NONAME_03
  WAIT 0 MS
   IF 8AFA: NOT
     THEN JUMP @NONAME_03
  END
     
  0B34: Create Command "AgON" to @AgON label
  0B34: Create Command "SgDgl" to @SgDgl label
  0B34: Create Command "SgM4" to @SgM4 label
  0B34: Create Command "SgRifle" to @SgRifle label
  0B34: Create Command "GangHelp" to @GangHelp label
 
  CHATMSG "GANG Help by Shanker & Rough. Scrie /GangHelp pentru o lista cu toate comenzile. " -1
 
   WHILE TRUE
   WAIT 0 MS
   IF 23@ == 1
   THEN
       ALLOC 4@ = 969
        0B75: samp get_chat_string 99 text_to 4@ prefix_to 5@ color_to 6@ prefix_color_to 7@
        IF OR
           0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a M4 for %s Use (/accept gun %d)." 9@v 11@v 10@          
           0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Desert Eagle for %s Use (/accept gun %d)." 9@v 11@v 10@
           0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a Rifle for %s Use (/accept gun %d)." 9@v 11@v 10@
           0AD4: 8@ = scan_string 4@ format "* Arms Dealer %s offered you a %s for %s Use (/accept gun %d)." 9@v 21@v 11@v 10@
           0AD4: 8@ = scan 4@ fmt "* Arms Dealer %*s offered you a %*s for %*s Use (/accept gun %d)." 2@
           0AD4: 8@ = scan 4@ fmt "* Arms Dealer %*s offered you a %*s%*c%*s for %*s Use (/accept gun %d)." 2@
           THEN
              SAY "/ag %s" 9@v
              SAY "/ag %d" 2@
              END
              free 4@
           END
           IF 0AB0: key_pressed 0x61
           THEN
              FOR 0@ = 0 TO 3
              SAY "/order 1"
              WAIT 100 MS
              END
           END
           IF 0AB0: key_pressed 0x62
           THEN
             FOR 0@ = 0 TO 3
             SAY "/order 2"
             WAIT 100 MS
             END
          END
          IF 0AB0: key_pressed 0x63
          THEN
            FOR 0@ = 0 TO 3
            SAY "/order 3"
            WAIT 100 MS
            END
         END
         IF 0AB0: key_pressed 0x64
         THEN
           FOR 0@ = 0 TO 3
           SAY "/order 4"
           WAIT 100 MS
           END
        END
        IF 0AB0: key_pressed 0x65
        THEN  
          FOR 0@ = 0 TO 3
          SAY "/order 5"
          WAIT 100 MS
       END
    END
 END  


 
  :CMDRET
  CHATMSG "Nu poti vinde arme unui Hitmen. " -1
  SAMP.CmdRet      
           
  :AgON
  SAMP.IsCommandTyped(0@)
   IF 8AD4: NOT 1@ SCAN 0@ FORMAT "%D" 2@
     THEN JUMP @ERROR_AgON
  END
  IF 2@ == 1
    THEN CHATMSG "Auto Accept Gun by Shanker & Rough activated. " -1
    23@ = 1    
    ELSE
      IF 2@ == 0
        THEN CHATMSG "Auto Accept Gun by Shanker & Rough deactivated. " -1
        23@ = 0
     END
  END    
  SAMP.CmdRet
 
  :ERROR_AgON
  SAMP.CmdRet
 
   
  :GangHelp
  CHATMSG "Comenzi: /AgON 1/0, /SgM4, /SgDgl, /SgRifle, /GSet. " -1
  SAMP.CmdRet
 
  :SgDgl
  FOR 12@ = 0 to 999
   IF SAMP.IsPlayerConnected(12@)
     THEN 26@ = SAMP.GetActorHandleByPlayerID(12@)
      IF 056D:   actor 26@ defined
        THEN  
        00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 15@
        00A0: store_actor 26@ position_to 16@ 17@ 18@
        050A: 19@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 16@ 17@ 18@
         IF 19@ <= 10.0
           THEN
            29@ = SAMP.GetPlayerColor(26@)
             IF OR
             8039: NOT 29@ == 0xAA3333
             8039: NOT 29@ == 0xFFAA3333
               THEN
               SAY "/sg %d Deagle 1" 12@
               END
            END
         END
      END
   END  
   SAMP.CmdRet
   
  :SgM4
  FOR 12@ = 0 to 999
   IF SAMP.IsPlayerConnected(12@)
     THEN 26@ = SAMP.GetActorHandleByPlayerID(12@)
      IF 056D:   actor 26@ defined
        THEN  
        00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 15@
        00A0: store_actor 26@ position_to 16@ 17@ 18@
        050A: 19@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 16@ 17@ 18@
         IF 19@ <= 10.0
           THEN
            29@ = SAMP.GetPlayerColor(26@)
             IF OR
             8039: NOT 29@ == 0xAA3333
             8039: NOT 29@ == 0xFFAA3333
               THEN
               SAY "/sg %d M4 1" 12@
               END
            END
         END
      END
   END  
   SAMP.CmdRet
 
  :SgRifle
  FOR 12@ = 0 to 999
   IF SAMP.IsPlayerConnected(12@)
     THEN 26@ = SAMP.GetActorHandleByPlayerID(12@)
      IF 056D:   actor 26@ defined
        THEN  
        00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 15@
        00A0: store_actor 26@ position_to 16@ 17@ 18@
        050A: 19@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 16@ 17@ 18@
         IF 19@ <= 10.0
           THEN
            29@ = SAMP.GetPlayerColor(26@)
             IF OR
             8039: NOT 29@ == 0xAA3333
             8039: NOT 29@ == 0xFFAA3333
               THEN
               SAY "/sg %d Rifle 1" 12@
               END
            END
         END
      END
   END  
   SAMP.CmdRet
   [/shcode]


[shcode=cpp]samp.iscommandtyped(1@)
0ad4: 2@ 1@ "%d" 3@
if 3@ == nume then ... [/shcode]
can u tell me how u get 0x???? for "nume" ?

const
nume = 0x?????
end
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
springfield said:
doroftel said:
can u tell me how u get 0x???? for "nume" ?

You want to convert a name to hex? Or get a hash to check it easier?

hmm,

[shcode=cpp]const
SI = 0x1337
end

if 5@ == SI //5@ == 0x1337
[...][/shcode]

how do you found "0x1337"?
 
Status
Not open for further replies.
Top