Jump to content
  • 0

Fast event bug


TheGodfather

Question

Salut, am o problema la aceasta functie, uneori in loc sa imi dea un string cu unul sau mai multe caractere imi da un string fara niciun caracter. Cum pot modifica functia asta astfel incat sa imi dea la ReactionString un string cu 1 sau mai multe caractere?

public ReactionTest()
{
    KillTimer(ReactionTimer);
    new string[256];
    if(PassiveMode == PASSIVE_OFF)
    {
        new Rstr[] = "aA1bBcCd6DeEfFg12Gh53swHjJkK534mMnNo3OpPqsQrRsStTuUvVwWxXyYzZ0123456789";
        for (new i = 0; i < 9; i++)ReactionString[i] = Rstr[random(sizeof(Rstr))];
        ReactionCash = random( MAX_WINNINGS - MIN_WINNINGS ) + random(1934) + MIN_WINNINGS * 4 + 120000;
    }
    else PassiveMode = PASSIVE_OFF;
    ReactionState = R_STATE_ACTIVE;
    format(string,sizeof(string),"{FFFFFF}[FAST]:{CCCCCC} Primul care scrie {FF6347}%s {CCCCCC}castiga {009602}%d$!",ReactionString,ReactionCash);
    SendClientMessageToAll(0xFFFFFFFF,string);
    ReactionTimer = SetTimer("ReactionTest",540000,true);
    return 1;
}

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.