Jump to content

Timp rămas până la Black Week

Pentru detalii complete despre promoție click aici

Black Week a început!

Pentru detalii complete despre promoție click aici

Problemă mod


Madalin
 Share

Recommended Posts

  • Descriere problema: Doresc să fac un mod care dă heal automat, rehab, când urcă un jucător să-l întrebe "Salut, heal sau rehab", de acolo sa citeasca chatul sa vada ce zice respectivul, heal sau rehab si sa-i acorde serviciul respectiv, problema e că nu știu care e funcția care citește chatul și nici s-o folosesc, plus că modul acum nu spune nimic când dă cineva G / nu acordă heal.

 

{$CLEO}

{$USE CLEO}
{$USE CLEO+}
{$USE file}
{$USE bitwise}
{$USE newOpcodes}
{$USE ini}

0662: "By"
thread "Version"
wait 2500

0B34: samp register_client_command "paramedic" to_label @paramedic
0B34: samp register_client_command "hm" to_label @hm
0B34: samp register_client_command "rm" to_label @rm
0B34: samp register_client_command "ambls" to_label @ambls
0B34: samp register_client_command "amblv" to_label @amblv
0B34: samp register_client_command "ambsf" to_label @ambsf
0B34: samp register_client_command "ranger" to_label @ranger
0B34: samp register_client_command "rain" to_label @rain

chatmsg "Paramedics Mod - to activate use [/paraon]" -1

:cmd_7979
wait 0
jump @cmd_7979

:unknown_6969
WHILE TRUE
WAIT 0
      IF 31@ == 1
      THEN
            IF
            Actor.Driving($PLAYER_ACTOR)
            then
            2@ = Actor.CurrentCar($PLAYER_ACTOR)
            FOR 0@ = 0 to 999 
                  IF SAMP.IsPlayerConnected(0@)
                  THEN
                        IF 1@ = SAMP.GetActorHandleByPlayerID(0@)
                        THEN
                        0B25: samp 8@ = get_player_health 0@
                        IF
                        8@  <= 96
                        THEN
                        03C0: 3@ = actor 1@ car
                        IF
                        003B:   2@ == 3@
                        THEN
                        0B36: samp 17@ = get_player_nickname 0@
                        0AF9: samp say_msg "Salut, %s, doresti heal sau rehab?" 0@
                        16@ = SAMP.GetPlayerColor(0@)
                        0B36: samp 17@ = get_player_nickname 0@
                            if
                            16@ == 0xFFC2A2DA
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in News Reporters." -1
                            wait 2000
                            else
        
                            if 16@ == 0xFFD7CE96
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Tow Truck Company." -1
                            wait 2000
                            else
                            
                            if 16@ == 0xFFECD450
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Taxi." -1
                            wait 2000
                            else
                                                        
                            if 16@ == 0xFFF29D9D
                            then
                            0AF9: samp say_msg "./heal %d 1" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Paramedics." -1
                            wait 2000
                            else
                            
                            if 16@ == 0xFF00FF78
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in School Instructors." -1
                            chatmsg "{FF0000}ATENTIE! VERIFICA DACA JUCATORUL SE AFLA IN SFSI, DACA SE AFLA, RETURNEAZA-I BANII!" -1
                            wait 2000
                            else
                             
                            if 16@ == 0xFF33AA33
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Green Street Bloods." -1
                            wait 2000
                            else                             
                              
                            if 16@ == 0xFF656565
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Verdant Family." -1
                            wait 2000
                            else  
                            
                            if 16@ == 0xFF8AA09D
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Vietnamese Boys." -1
                            wait 2000
                            else                                                          
                              
                            if 16@ == 0xFF946141
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in The Tsar Bratva." -1
                            wait 2000
                            else                               
                              
                            if 16@ == 0xFFD0000F
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Red Dragon Triad." -1
                            wait 2000
                            else  
                            
                            if 16@ == 0xFFB32CF6
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Southern Pimps." -1
                            wait 2000
                            else                            
                            
                            if 16@ == 0xFF3A460C
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Avispa Rifa." -1
                            wait 2000
                            else   
                             
                            if 16@ == 0xFF33CCFF
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in 69 Pier Mobs." -1
                            wait 2000
                            else 
                            
                            if 16@ == 0xFFFF9900
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in El Loco Cartel." -1
                            wait 2000
                            else 
                              
                            if 16@ == 0xFF1E519D
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla intr-un Departament." -1
                            wait 2000
                            else
                            
                            if 16@ == 0xFFAA3333
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Hitmen Agency." -1
                            wait 2000
                            else 
                            
                            if 16@ == 0xFF9ACD32
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal se afla in Mayor." -1
                            wait 2000
                            else 
                            
                            if 16@ == 0xFFC4C4C4
                            then
                            0AF9: samp say_msg "./heal %d 50" 0@
                            chatmsg "Jucatorul la care i-ai dat heal este civil." -1
                            wait 2000 
                              
                            end
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end 
                            end
                            end
                            end  
                            end
                            end                           
                            

:paramedic
0B12: 31@ = 31@ XOR 1
If 31@ == 1
then
chatmsg "Paramedics Mod a fost activat!" -1
15@ = 2
else
chatmsg  "Paramedics Mod a fost dezactivat!" -1
end
samp.CmdRet

:hm
SAMP.IsCommandTyped(20@)
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR
0AF9: samp say_msg "./heal %d 1" 1@
SAMP.CmdRet()

:rm
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./rehab me"
SAMP.CmdRet()

:ambls
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Ambulanta LS la mine"
SAMP.CmdRet()

:amblv
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Ambulanta LV la mine"
SAMP.CmdRet()

:ambsf
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Ambulanta SF la mine"
SAMP.CmdRet()

:ranger
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Paramedic Ranger la mine"
SAMP.CmdRet()

:rain
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Raindance la mine"
SAMP.CmdRet()

 

  • Alte precizări: Mulțumesc anticipat.
Edited by Nic
Link to comment
Share on other sites

@Madalin The problem you had in your code is:

 

- You had an unknown thing named unknown_6969 above your while loop.

- The code you wrote was untidy and I arranged it.

- The SCM doesn't work with else if or (elif) like others program language, I don't really understand SCM but it is what it is, so I decided to delete those "else" and replace them all with "end".

- You have been using a lot of "end" for no reason in your while loop function.

- I have deleted SAMP.IsCommandTyped(20@) from your punch of commands which you never used the 20@ variable on it.

 

There is my debugged code (Btw, I did not test the code at all, and I just re-corrected and replaced some stuff on it. and also arranged)

If you still had problem in some minor things, let me know, maybe i can do something.

 

The whole Code:

{$CLEO}

0662: "By"
thread "Version"
wait 2500

0B34: samp register_client_command "paramedic" to_label @paramedic
0B34: samp register_client_command "hm" to_label @hm
0B34: samp register_client_command "rm" to_label @rm
0B34: samp register_client_command "ambls" to_label @ambls
0B34: samp register_client_command "amblv" to_label @amblv
0B34: samp register_client_command "ambsf" to_label @ambsf
0B34: samp register_client_command "ranger" to_label @ranger
0B34: samp register_client_command "rain" to_label @rain

chatmsg "Paramedics Mod - to activate use [/paraon]" -1

:cmd_7979
wait 0
jump @cmd_7979

WHILE TRUE
WAIT 0

IF 31@ == 1
THEN
    IF Actor.Driving($PLAYER_ACTOR)
    then
        2@ = Actor.CurrentCar($PLAYER_ACTOR)
        FOR 0@ = 0 to 999 
            IF SAMP.IsPlayerConnected(0@)
            THEN
                IF 1@ = SAMP.GetActorHandleByPlayerID(0@)
                THEN
                    0B25: samp 8@ = get_player_health 0@
                    IF 8@ <= 96
                    THEN
                        03C0: 3@ = actor 1@ car
                        IF 003B:   2@ == 3@
                        THEN
                            0B36: samp 17@ = get_player_nickname 0@
                            0AF9: samp say_msg "Salut, %s, doresti heal sau rehab?" 0@
                            16@ = SAMP.GetPlayerColor(0@)
                            0B36: samp 17@ = get_player_nickname 0@
                            if 16@ == 0xFFC2A2DA
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in News Reporters." -1
                                wait 2000
                            end
                            if 16@ == 0xFFD7CE96
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Tow Truck Company." -1
                                wait 2000
                            end  
                            if 16@ == 0xFFECD450
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Taxi." -1
                                wait 2000
                            end                             
                            if 16@ == 0xFFF29D9D
                            then
                                0AF9: samp say_msg "./heal %d 1" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Paramedics." -1
                                wait 2000
                            end        
                            if 16@ == 0xFF00FF78
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in School Instructors." -1
                                chatmsg "{FF0000}ATENTIE! VERIFICA DACA JUCATORUL SE AFLA IN SFSI, DACA SE AFLA, RETURNEAZA-I BANII!" -1
                                wait 2000
                            end    
                            if 16@ == 0xFF33AA33
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Green Street Bloods." -1
                                wait 2000
                            end                                  
                            if 16@ == 0xFF656565
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Verdant Family." -1
                                wait 2000
                            end     
                            if 16@ == 0xFF8AA09D
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Vietnamese Boys." -1
                                wait 2000
                            end                                                                   
                            if 16@ == 0xFF946141
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in The Tsar Bratva." -1
                                wait 2000
                            end                                         
                            if 16@ == 0xFFD0000F
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Red Dragon Triad." -1
                                wait 2000
                            end          
                            if 16@ == 0xFFB32CF6
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Southern Pimps." -1
                                wait 2000
                            end                                    
                            if 16@ == 0xFF3A460C
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Avispa Rifa." -1
                                wait 2000
                            end                        
                            if 16@ == 0xFF33CCFF
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in 69 Pier Mobs." -1
                                wait 2000
                            end           
                            if 16@ == 0xFFFF9900
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in El Loco Cartel." -1
                                wait 2000
                            end       
                            if 16@ == 0xFF1E519D
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla intr-un Departament." -1
                                wait 2000
                            end    
                            if 16@ == 0xFFAA3333
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Hitmen Agency." -1
                                wait 2000
                            end     
                            if 16@ == 0xFF9ACD32
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Mayor." -1
                                wait 2000
                            end                            
                            if 16@ == 0xFFC4C4C4
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal este civil." -1
                                wait 2000
                            end    
                        end
                    end 
                end 
            end 
        end 
    end 
end 

END //WHILE TRUE                        

:paramedic
If 31@ == 0
then
    chatmsg "Paramedics Mod a fost activat!" -1
    31@ = 1
else
    chatmsg  "Paramedics Mod a fost dezactivat!" -1
    31@ = 0
end
samp.CmdRet

:hm
SAMP.IsCommandTyped(20@)
if 0AD4: 20@ = scan_string 20@ format "%d" 21@  
else_jump @hm_fail
1@ = SAMP.GetPlayerNickname(21@)
say "./heal %d 1" 21@  
jump @hm_done

:hm_fail
chatmsg "{FFFFFF}Error: Try /hm <ID>" -1
SAMP.CmdRet

:hm_done
SAMP.CmdRet

:rm
0AF9: samp say_msg "./rehab me"
SAMP.CmdRet()

:ambls
0AF9: samp say_msg "./r Ambulanta LS la mine"
SAMP.CmdRet()

:amblv
0AF9: samp say_msg "./r Ambulanta LV la mine"
SAMP.CmdRet()

:ambsf
0AF9: samp say_msg "./r Ambulanta SF la mine"
SAMP.CmdRet()

:ranger
0AF9: samp say_msg "./r Paramedic Ranger la mine"
SAMP.CmdRet()

:rain
0AF9: samp say_msg "./r Raindance la mine"
SAMP.CmdRet()

 

Link to comment
Share on other sites

14 hours ago, D J C said:

@Madalin The problem you had in your code is:

 

- You had an unknown thing named unknown_6969 above your while loop.

- The code you wrote was untidy and I arranged it.

- The SCM doesn't work with else if or (elif) like others program language, I don't really understand SCM but it is what it is, so I decided to delete those "else" and replace them all with "end".

- You have been using a lot of "end" for no reason in your while loop function.

- I have deleted SAMP.IsCommandTyped(20@) from your punch of commands which you never used the 20@ variable on it.

 

There is my debugged code (Btw, I did not test the code at all, and I just re-corrected and replaced some stuff on it. and also arranged)

If you still had problem in some minor things, let me know, maybe i can do something.

 

The whole Code:


{$CLEO}

0662: "By"
thread "Version"
wait 2500

0B34: samp register_client_command "paramedic" to_label @paramedic
0B34: samp register_client_command "hm" to_label @hm
0B34: samp register_client_command "rm" to_label @rm
0B34: samp register_client_command "ambls" to_label @ambls
0B34: samp register_client_command "amblv" to_label @amblv
0B34: samp register_client_command "ambsf" to_label @ambsf
0B34: samp register_client_command "ranger" to_label @ranger
0B34: samp register_client_command "rain" to_label @rain

chatmsg "Paramedics Mod - to activate use [/paraon]" -1

:cmd_7979
wait 0
jump @cmd_7979

WHILE TRUE
WAIT 0

IF 31@ == 1
THEN
    IF Actor.Driving($PLAYER_ACTOR)
    then
        2@ = Actor.CurrentCar($PLAYER_ACTOR)
        FOR 0@ = 0 to 999 
            IF SAMP.IsPlayerConnected(0@)
            THEN
                IF 1@ = SAMP.GetActorHandleByPlayerID(0@)
                THEN
                    0B25: samp 8@ = get_player_health 0@
                    IF 8@ <= 96
                    THEN
                        03C0: 3@ = actor 1@ car
                        IF 003B:   2@ == 3@
                        THEN
                            0B36: samp 17@ = get_player_nickname 0@
                            0AF9: samp say_msg "Salut, %s, doresti heal sau rehab?" 0@
                            16@ = SAMP.GetPlayerColor(0@)
                            0B36: samp 17@ = get_player_nickname 0@
                            if 16@ == 0xFFC2A2DA
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in News Reporters." -1
                                wait 2000
                            end
                            if 16@ == 0xFFD7CE96
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Tow Truck Company." -1
                                wait 2000
                            end  
                            if 16@ == 0xFFECD450
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Taxi." -1
                                wait 2000
                            end                             
                            if 16@ == 0xFFF29D9D
                            then
                                0AF9: samp say_msg "./heal %d 1" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Paramedics." -1
                                wait 2000
                            end        
                            if 16@ == 0xFF00FF78
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in School Instructors." -1
                                chatmsg "{FF0000}ATENTIE! VERIFICA DACA JUCATORUL SE AFLA IN SFSI, DACA SE AFLA, RETURNEAZA-I BANII!" -1
                                wait 2000
                            end    
                            if 16@ == 0xFF33AA33
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Green Street Bloods." -1
                                wait 2000
                            end                                  
                            if 16@ == 0xFF656565
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Verdant Family." -1
                                wait 2000
                            end     
                            if 16@ == 0xFF8AA09D
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Vietnamese Boys." -1
                                wait 2000
                            end                                                                   
                            if 16@ == 0xFF946141
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in The Tsar Bratva." -1
                                wait 2000
                            end                                         
                            if 16@ == 0xFFD0000F
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Red Dragon Triad." -1
                                wait 2000
                            end          
                            if 16@ == 0xFFB32CF6
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Southern Pimps." -1
                                wait 2000
                            end                                    
                            if 16@ == 0xFF3A460C
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Avispa Rifa." -1
                                wait 2000
                            end                        
                            if 16@ == 0xFF33CCFF
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in 69 Pier Mobs." -1
                                wait 2000
                            end           
                            if 16@ == 0xFFFF9900
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in El Loco Cartel." -1
                                wait 2000
                            end       
                            if 16@ == 0xFF1E519D
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla intr-un Departament." -1
                                wait 2000
                            end    
                            if 16@ == 0xFFAA3333
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Hitmen Agency." -1
                                wait 2000
                            end     
                            if 16@ == 0xFF9ACD32
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal se afla in Mayor." -1
                                wait 2000
                            end                            
                            if 16@ == 0xFFC4C4C4
                            then
                                0AF9: samp say_msg "./heal %d 50" 0@
                                chatmsg "Jucatorul la care i-ai dat heal este civil." -1
                                wait 2000
                            end    
                        end
                    end 
                end 
            end 
        end 
    end 
end 

END //WHILE TRUE                        

:paramedic
If 31@ == 0
then
    chatmsg "Paramedics Mod a fost activat!" -1
    31@ = 1
else
    chatmsg  "Paramedics Mod a fost dezactivat!" -1
    31@ = 0
end
samp.CmdRet

:hm
SAMP.IsCommandTyped(20@)
if 0AD4: 20@ = scan_string 20@ format "%d" 21@  
else_jump @hm_fail
1@ = SAMP.GetPlayerNickname(21@)
say "./heal %d 1" 21@  
jump @hm_done

:hm_fail
chatmsg "{FFFFFF}Error: Try /hm <ID>" -1
SAMP.CmdRet

:hm_done
SAMP.CmdRet

:rm
0AF9: samp say_msg "./rehab me"
SAMP.CmdRet()

:ambls
0AF9: samp say_msg "./r Ambulanta LS la mine"
SAMP.CmdRet()

:amblv
0AF9: samp say_msg "./r Ambulanta LV la mine"
SAMP.CmdRet()

:ambsf
0AF9: samp say_msg "./r Ambulanta SF la mine"
SAMP.CmdRet()

:ranger
0AF9: samp say_msg "./r Paramedic Ranger la mine"
SAMP.CmdRet()

:rain
0AF9: samp say_msg "./r Raindance la mine"
SAMP.CmdRet()

 

Doesn't work...

Link to comment
Share on other sites

Incearca sa pornesti de la asta, ar trebui sa dea automat Heal. 

Momentan nu sunt acasa ajung mai diseara si incerc daca pot face ceva. 

 

 

0@ = Actor.EmulateFromPlayer(0) :NONAME_1wait 0 if 0AB0:
 key_pressed 85 else_jump @NONAME_2 1@ = Actor.Health(0@)1@ +=
50 Actor.Health(0@) = 1@0ACE: show_formatted_text_box {ff5e6c}"Jucatorul a primit heal"

0x0ACEwait 10:NONAME_2jump @NONAME_1  // 85 este tasta G
 

Link to comment
Share on other sites

Verifica daca functioneaza asta, daca da, vrei sa faci sa intrebe de heal/rehab si mai apoi cand jucatorul raspunde sa ii dea? 

 

{$CLEO}

{$USE CLEO}
{$USE CLEO+}
{$USE file}
{$USE bitwise}
{$USE newOpcodes}
{$USE ini}

0662: "By"
thread "Version"
wait 2500

0B34: "paramedic" to_label @paramedic
0B34: "hm" to_label @hm
0B34: "rm" to_label @rm
0B34: "ambls" to_label @ambls
0B34: "amblv" to_label @amblv
0B34: "ambsf" to_label @ambsf
0B34: "ranger" to_label @ranger
0B34: "rain" to_label @rain

chatmsg "Paramedics Mod - to activate use [/paraon]" -1

WHILE TRUE
WAIT 0
      IF 31@ == 1
      THEN
            IF
            Actor.Driving($PLAYER_ACTOR)
            then
            2@ = Actor.CurrentCar($PLAYER_ACTOR)
            FOR 0@ = 0 to 999 
                  IF SAMP.IsPlayerConnected(0@)
                  THEN
                        IF 1@ = SAMP.GetActorHandleByPlayerID(0@)
                        THEN
                        0B25: samp 8@ = get_player_health 0@
                        IF
                        8@  <= 96
                        THEN
                        03C0: 3@ = actor 1@ car
                            IF
                            003B:   2@ == 3@
                            THEN
                            0B36: samp 17@ = get_player_nickname 0@
//                            0AF9: samp say_msg "Salut, %s, doresti heal sau rehab?" 0@
                            16@ = SAMP.GetPlayerColor(0@)
//                            0B36: samp 17@ = get_player_nickname 0@
        
                                                        
                                if 16@ == 0xFFF29D9D
                                then
                                    0AF9: samp say_msg "./heal %d 1" 0@
                                    chatmsg "Jucatorul la care i-ai dat heal se afla in Paramedics." -1
                                    wait 2000
                                else
                                    
                                    if 16@ == 0xFF00FF78
                                    then
                                        0AF9: samp say_msg "./heal %d 50" 0@
                                        chatmsg "Jucatorul la care i-ai dat heal se afla in School Instructors." -1
                                        chatmsg "{FF0000}ATENTIE! VERIFICA DACA JUCATORUL SE AFLA IN SFSI, DACA SE AFLA, RETURNEAZA-I BANII!" -1
                                        wait 2000
                                    else
                                        0AF9: samp say_msg "./heal %d 50" 0@                    
                                    end
                                end  
                            end
                        end
                    end
                end
            end
        end
    end
end                         
                            

:paramedic
0B12: 31@ = 31@ XOR 1
If 31@ == 1
then
    chatmsg "Paramedics Mod a fost activat!" -1
else
    chatmsg  "Paramedics Mod a fost dezactivat!" -1
end
samp.CmdRet

:hm
SAMP.IsCommandTyped(20@)
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR
0AF9: samp say_msg "./heal %d 1" 1@
SAMP.CmdRet()

:rm
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./rehab me"
SAMP.CmdRet()

:ambls
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Ambulanta LS la mine"
SAMP.CmdRet()

:amblv
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Ambulanta LV la mine"
SAMP.CmdRet()

:ambsf
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Ambulanta SF la mine"
SAMP.CmdRet()

:ranger
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Paramedic Ranger la mine"
SAMP.CmdRet()

:rain
SAMP.IsCommandTyped(20@)
0AF9: samp say_msg "./r Raindance la mine"
SAMP.CmdRet()

 

Link to comment
Share on other sites

  • Nic locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.