Jump to content
  • 0

foreach


TheGodfather

Question

Recommended Posts

  • 0
5 minutes ago, irinel77 said:

Pur si simplu faci 2 foldere numite fixes si temp in folderul scriptfiles.

Multumesc.

La OnPlayerCommandPerformed nu imi arata mesajul cu unknown command cand scriu o comanda care nu exista, aveti idee de ce? Am mai cautat solutii pe internet dar la toate e la fel

public e_COMMAND_ERRORS:OnPlayerCommandPerformed(playerid, cmdtext[], e_COMMAND_ERRORS:success) {
    //antispam
    if(aspam[playerid] == 0 && PlayerInfo[playerid][pAdmin] < 😎
    aspam[playerid] = 1;
    //antispam
    if(success == COMMAND_OK) {
        SpamCheck[playerid] = GetTickCount();
        return COMMAND_OK;
    }
    SCMM(playerid, COLOR_GREY, "Error: Unknown command!");
    return COMMAND_OK;
}

Link to comment
Share on other sites

  • 0
6 minutes ago, Banditul said:

https://github.com/pawn-lang/YSI-Includes/issues/5#issuecomment-96043340

Aparent pentru verificarea aia ai nevoie de OnPlayerCommandReceived nu de OnPlayerCommandPerformed pentru ca daca comanda e invalida e imposibil sa fie executata

if(success == COMMAND_OK) SpamCheck[playerid] = GetTickCount();
if(success == COMMAND_UNDEFINED) {SCMM(playerid, COLOR_GREY, "Error: Unknown command!"); return COMMAND_ZERO_RET;}

Am pus asa la OnPlayerCommandReceived, indiferent de ce comanda introduc imi scrie mesajul default, SERVER: Unknown command. (nu cel pe care il am eu)

Link to comment
Share on other sites

  • 0

Daca nu sunt logat cu pin daca dau o comanda care nu exista imi arata bine, daca scriu de ex /a imi scrie sintaxa comenzii, dar ar trebui sa imi dea mesajul de aici

if(strlen(PlayerInfo[playerid][pPin]) != 0 && PlayerInfo[playerid][pPinLogged] == 0) { SCMM(playerid, -1, "{FF6347}[PIN] {FFFFFF}You can not use commands because you did not enter a valid PIN!"); return COMMAND_OK; }

Cu ok merge bine daca nu exista comanda, daca pun in loc de COMMAND_OK pun COMMAND_ZERO_RET indiferent daca comanda exista sau nu primesc mesajul default, 

SERVER: Unknown command

Link to comment
Share on other sites

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.