[FilterScript] TextDraw Captcha
#2

Code:
new PlayerText:Captcha[40]
Если я не ошибаюсь, то при заходе другого игрока, ID тексдравов старого игрока заменятся новыми.
Так будет правильней:
Code:
new PlayerText:Captcha[MAX_PLAYERS][40]
pawn Code:
if(i == 0) Captcha[i] = CreatePlayerTextDraw(playerid, 269.0, 139.0, "Anti-bot captcha:");
if(i == 1)
{
    new cstring[24];
    format(cstring, sizeof(cstring), "%c%c%c%c%c", TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))]);
    Captcha[i] = CreatePlayerTextDraw(playerid, 422.0, 139.0, cstring);
    SetPVarString(playerid, "CaptchaCode", cstring);
}
if(i == 2) Captcha[i] = CreatePlayerTextDraw(playerid, 285.0, 174.0, "Please repeat:");
if(i == 3) Captcha[i] = CreatePlayerTextDraw(playerid, 427.0, 178.0, "-----");
...
Для того, чтобы избежать многочисленной проверки одной переменной, логичнее будет использовать else if вместо if
Reply


Messages In This Thread
TextDraw Captcha - by OKStyle - 23.03.2013, 03:27
Re: TextDraw Captcha - by GameMan - 23.03.2013, 11:29
Re: TextDraw Captcha - by OKStyle - 23.03.2013, 11:52
Re: TextDraw Captcha - by Alexander_Petrov - 23.03.2013, 12:05
Re: TextDraw Captcha - by OKStyle - 23.03.2013, 12:37
Re: TextDraw Captcha - by AirKite - 23.03.2013, 20:21
Re: TextDraw Captcha - by Mutha_X - 24.03.2013, 05:14
Re: TextDraw Captcha - by OKStyle - 25.03.2013, 03:18
Re: TextDraw Captcha - by vampir9763 - 06.04.2013, 08:12
Re: TextDraw Captcha - by lost13 - 06.06.2013, 07:22
Re: TextDraw Captcha - by Stepashka - 06.06.2013, 07:35

Forum Jump:


Users browsing this thread: 3 Guest(s)