Jump to content

Question

Posted

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;
}

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.