[shcode=cpp]
// how .ini looks
[SectionName]
intKey=1337
aliat.1="Avispa Rifa"
aliat.2="Tow Truck Company"
aliat.3="SF Taxi"
aliat.4="Paramedics"
aliat.5="NoClan"
aliat.6="NoClan.2"
Heal.Jucatori=50
Heal.Aliati=1
Max.Heal=1337
[/shcode]
[shcode=cpp]
// this is my heal system
alloc 15@ = 600 // chat line
alloc 16@ = 600
alloc 17@ = 600
alloc 18@ = 600
alloc 19@ = 600
alloc $Aliat_5_ = 600
alloc $Aliat_6_ = 600
alloc 30@ = 600
say "/id %d" 1@
wait 100
0B75: samp get_chat_string 99 text_to 15@ -1 -1 -1
0AF4: 16@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.1"
0AF4: 17@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.2"
0AF4: 18@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.3"
0AF4: 19@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.4"
0AF4: $Aliat_5_ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.5"
0AF4: $Aliat_6_ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.6"
0AF0: 29@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "Max.Heal"
if 20@ >= 29@
then
chatmsg "{E24DBF}[Paramedics] {FFFFFF}Modul a dat un numar de %d heal-uri. " -1 20@
Actor.StorePos($PLAYER_ACTOR, 21@, 22@, 24@)
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 21@ 22@ 24@
0AF1: write_int 1337 to_ini_file "cleo\config.ini" section "SectionName" key "Max.Heal"
end
// from here mod will scan which faction they are
if and
0C29: 25@ = stristr string1 15@ string2 $Aliat_5_
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ $Aliat_5_
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 $Aliat_6_
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ $Aliat_6_
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 16@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 16@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 17@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 17@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 18@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 18@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 19@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 19@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
// if no one of the above conditions are true then they will get heal with 50$
if and
8C29: 25@ = stristr string1 15@ string2 16@
8C29: 25@ = stristr string1 15@ string2 17@
8C29: 25@ = stristr string1 15@ string2 18@
8C29: 25@ = stristr string1 15@ string2 19@
8C29: 25@ = stristr string1 15@ string2 $Aliat_5_
8C29: 25@ = stristr string1 15@ string2 $Aliat_6_
not 20@ >= 29@
then
chatmsg "Jucatorul %d a primit heal!" -1 1@
0AF0: 28@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "Heal.Jucatori"
say "/heal %d %d" 1@ 28@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AF0: 27@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "Max.Heal"
if not 27@ == 1337
then
0AD3: 30@ = format "%d/%d jucatori au primit heal!" 20@ 27@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
else
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
end
[/shcode]
the problem is here
[shcode=cpp]
if and
0C29: 25@ = stristr string1 15@ string2 19@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 19@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
[/shcode]
var 19@ = string ( Paramedics )
if a paramedic get into my car he should get heal with 1$, all time!
the problem is that, this mod already did 340 /heal and no one of them failed except two /heals which both of them was from paramedic script side
what's the cause? could be client side script bugged or just cause of ping?
// how .ini looks
[SectionName]
intKey=1337
aliat.1="Avispa Rifa"
aliat.2="Tow Truck Company"
aliat.3="SF Taxi"
aliat.4="Paramedics"
aliat.5="NoClan"
aliat.6="NoClan.2"
Heal.Jucatori=50
Heal.Aliati=1
Max.Heal=1337
[/shcode]
[shcode=cpp]
// this is my heal system
alloc 15@ = 600 // chat line
alloc 16@ = 600
alloc 17@ = 600
alloc 18@ = 600
alloc 19@ = 600
alloc $Aliat_5_ = 600
alloc $Aliat_6_ = 600
alloc 30@ = 600
say "/id %d" 1@
wait 100
0B75: samp get_chat_string 99 text_to 15@ -1 -1 -1
0AF4: 16@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.1"
0AF4: 17@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.2"
0AF4: 18@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.3"
0AF4: 19@ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.4"
0AF4: $Aliat_5_ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.5"
0AF4: $Aliat_6_ = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "aliat.6"
0AF0: 29@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "Max.Heal"
if 20@ >= 29@
then
chatmsg "{E24DBF}[Paramedics] {FFFFFF}Modul a dat un numar de %d heal-uri. " -1 20@
Actor.StorePos($PLAYER_ACTOR, 21@, 22@, 24@)
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 21@ 22@ 24@
0AF1: write_int 1337 to_ini_file "cleo\config.ini" section "SectionName" key "Max.Heal"
end
// from here mod will scan which faction they are
if and
0C29: 25@ = stristr string1 15@ string2 $Aliat_5_
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ $Aliat_5_
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 $Aliat_6_
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ $Aliat_6_
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 16@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 16@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 17@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 17@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 18@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 18@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
if and
0C29: 25@ = stristr string1 15@ string2 19@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 19@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
// if no one of the above conditions are true then they will get heal with 50$
if and
8C29: 25@ = stristr string1 15@ string2 16@
8C29: 25@ = stristr string1 15@ string2 17@
8C29: 25@ = stristr string1 15@ string2 18@
8C29: 25@ = stristr string1 15@ string2 19@
8C29: 25@ = stristr string1 15@ string2 $Aliat_5_
8C29: 25@ = stristr string1 15@ string2 $Aliat_6_
not 20@ >= 29@
then
chatmsg "Jucatorul %d a primit heal!" -1 1@
0AF0: 28@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "Heal.Jucatori"
say "/heal %d %d" 1@ 28@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AF0: 27@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "Max.Heal"
if not 27@ == 1337
then
0AD3: 30@ = format "%d/%d jucatori au primit heal!" 20@ 27@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
else
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
end
[/shcode]
the problem is here
[shcode=cpp]
if and
0C29: 25@ = stristr string1 15@ string2 19@
not 20@ >= 29@
then
chatmsg "Aliatul %d din factiunea %s a primit heal!" -1 1@ 19@
say "/heal %d 1" 1@
0AF1: write_int 1@ to_ini_file "cleo\config.ini" section "SectionName" key "intKey"
20@ += 1
0AD3: 30@ = format "%d jucatori au primit heal!" 20@
0C48: samp textdraw 20 create 30@ pos 300.0 330.0
end
[/shcode]
var 19@ = string ( Paramedics )
if a paramedic get into my car he should get heal with 1$, all time!
the problem is that, this mod already did 340 /heal and no one of them failed except two /heals which both of them was from paramedic script side
what's the cause? could be client side script bugged or just cause of ping?