So I made a system of battles like Duel an option to choose from the HP menu
As soon as I click on the battle it gives me SLAY
Code:
L 04/18/2020 - 17:13:41: [AMXX] Run time error 10: native error (native "set_user_health")
L 04/18/2020 - 17:13:41: [AMXX] [0] jb_lr_contest.sma::StartGame (line 424)
L 04/18/2020 - 17:13:41: [AMXX] [1] jb_lr_contest.sma::TaskCountdown (line 298)
Code:
native jb_is_lr_running(&guard = 0, &prisoner = 0, &game = 0);
that what i did in my include jb_lastrequest.inc
Line: 424
Code:
StartGame(iGameId)
{
g_iCountdown = -1;
new pGuard, pPrisoner;
jb_is_lr_running(pGuard, pPrisoner);
set_user_health(pGuard, 100);
set_user_health(pPrisoner, 100);
switch (iGameId)
{
case GAME_TRANSLATE:
{
new szTranslate[70];
//g_iCountdown = 30;
ArrayGetString(g_hTranslate, random(ArraySize(g_hTranslate)), szTranslate, charsmax(szTranslate));
parse(szTranslate, g_szTranslateWord, charsmax(g_szTranslateWord), g_szGameString, charsmax(g_szGameString));
jb_client_print(pGuard, "^4Contest Question:^1 which is the^3 translation^1 of^4 %s^1?", g_szGameString);
jb_client_print(pPrisoner, "^4Contest Question:^1 which is the^3 translation^1 of^4 %s^1?", g_szGameString);
//jb_client_print(0, "^4Contest Question:^1 which is the^3 translation^1 of^4 %s^1?", g_szGameString);
}
Line: 298
Code:
public TaskCountdown(iTaskId)
{
if (!g_iCountdown)
{
g_iCurrentGame = g_iChosenGame;
StartGame(g_iCurrentGame);
return;
}
new szCountdown[15];
num_to_word(g_iCountdown, szCountdown, charsmax(szCountdown));
client_cmd(0, "spk ^"\vox/%s^"", szCountdown);
set_hudmessage(0, 60, 150, -1.0, 0.4, 2, 0.02, 1.0, 0.01, 0.1);
ClearSyncHud(0, g_hSyncHud);
ShowSyncHudMsg(0, g_hSyncHud, "The ^"%s^" will start in^n[ %d seconds ]", g_szGameNames[g_iChosenGame], g_iCountdown);
g_iCountdown--;
}
Code:
new g_iCurrentGame;