Jump to content
  • 0

Problema Comanda


m0untain

Question

Salutare ! Vreau sa construiesc o comanda pentru un event. Dar din pacate cand tastez comanda pe server imi spune ca nu exista iar in consola primesc o eroare.

PS [  i  ]  nu apare. In GM Exista, dar aici nu ma lasa sa pun.

[debug] Run time error 4: "Array index out of bounds"
[debug]  Accessing element at index 65535 past array upper bound 999
[debug] AMX backtrace:
[debug] #0 00053180 in public cmd_m0untainrevent (0, 5259032) from rnsv1beta.amx
[debug] #1 native CallLocalFunction () from samp-server.exe
[debug] #2 00000588 in public OnPlayerCommandText (0, 5258968) from rnsv1beta.amx

CMD:revent(playerid)
{
    if(!IsPlayerAdmin(playerid)) return SendError(playerid, "Only RCONS can use this command","Only RCONS can use this command");
    new mostkills = INVALID_PLAYER_ID,string[128];
    foreach(Player, i)
    {
        if(RocketEvent == 1)
        {
            format(string, sizeof(string), "~r~event over!~n~~y~winner:~n~~g~%s~n~~w~%d kills", PlayerName(mostkills), PlayerInfo[mostkills][REventKills]);
            GameTextForPlayer(i,  string, 10000, 0);
            PlayerInfo[REventKills] = 0;
            SetTimer("HostName", 5000, true);
        }
        if(PlayerInfo[REventKills] > PlayerInfo[mostkills][REventKills]) mostkills = i;
        GameTextForPlayer(playerid, "~r~rocket event~n~~y~start killing!", 3000, 5);
        GivePlayerWeaponEx(playerid, 35, 100000);
        KillTimer(HostNameTimer);
        SendRconCommand("hostname Romania New Stunt - Rocket Event!");
    }
    return 1;
}

Edited by m0untain
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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. For more details you can also review our Terms of Use and Privacy Policy.