KamikazeSripterul
Well-known member
- Joined
- Jun 30, 2019
- Messages
- 353
- Reaction score
- 23
Code:
{$CLEO}
{$INCLUDE SF}
0000:
thread "TesterCMD"
repeat
wait 0
until SAMP.Available()
15@ = 0
0B34: "start" @start
0B34: "stop" @stop
0B34: "next" @next
0B34: "prev" @previous
WHILE TRUE
WAIT 0
IF 10@ == -1
THEN
chatmsg "{cecece}[TesterCMD]: {ff0000}Foloseste /next pentru a pune prima intrebare." -1
10@ = 0
END
IF 10@ == 22
THEN
chatmsg "{cecece}[TesterCMD]: {ff0000}Testul a luat sfarsit (modul a fost resetat)." -1
10@ = 0
END
END
:start
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR
0B36: samp 6@ = get_player_nickname 1@
say "/cw Salut, eu sunt testerul tau %s, cu mine o sa sustii testul de intrare in Paramedic Department." 6@
say "/cw Pentru inceput, tasteaza [/turn off] si [/setfreq 0]."
say "/cw Daca dai [/q] esti picat, dacpa iei crash ai timp 5 minute sa revii."
say "/cw O greseala 1/3 si 3/3 = picat, iar 3 secunde AFK = picat."
say "/cw Timp de raspuns 60 de secunde. Incepem?"
SAMP.CmdRet()
:stop
IF SAMP.IsCommandTyped(20@)
THEN
IF 0AD4: $NOT_USED = scan_string 20@ format "trecut %d" 0@
THEN
0B36: samp 1@ = get_player_nickname 0@
say "/cw Felicitari, %s! Ai trecut testul in Paramedic Las Venturas!" 1@
15@ = 20
ELSE
IF 0AD4: $NOT_USED = scan_string 20@ format "picat %d" 0@
THEN
0B36: samp 1@ = get_player_nickname 0@
say "/cw Imi pare rau, %s. Ai picat testul in Paramedic Las Venturas." 1@
15@ = 20
END
END
ELSE
chatmsg "{cecece}[TesterCMD]: {ff0000}Jucator trecut: /stop trecut <id>" -1
chatmsg "{cecece}[TesterCMD]: {ff0000}Jucator picat: /stop picat <id>" -1
END
SAMP.CmdRet()
:next
10@ += 1
alloc 25@ 260
alloc 26@ 260
format 18@s "q%d" 10@
0AF4: 25@ = read_string_from_ini_file "cleo\TesterCMD.ini" section "Questions" key 18@s
0AF4: 26@ = read_string_from_ini_file "cleo\TesterCMD.ini" section "Answers" key 18@s
chatmsg 21@ -1
free 25@
free 26@
SAMP.CmdRet()
:previous
10@ -= 1
alloc 25@ 260
alloc 26@ 260
format 18@s "q%d" 10@
0AF4: 25@ = read_string_from_ini_file "cleo\TesterCMD.ini" section "Questions" key 18@s
0AF4: 26@ = read_string_from_ini_file "cleo\TesterCMD.ini" section "Answers" key 18@s
chatmsg 21@ -1
free 25@
free 26@
SAMP.CmdRet()
So i have the code above.. /next and /prev don't work, they instantly crash and /start doesn't work either.. it just.. doesn't say anything.. Can anyone please help me? i'm confused.
What is /next and /prev supposed to do? Once you type /prev or /next it will change the variable 10@ (int) to match the format of the key to take the strings from .ini however those don't work and i'm not sure why.. anyone can help?