SetTimer
#3

Quote:
Originally Posted by zDevon
Посмотреть сообщение
SetTimer is calling OneSecondTimer but is not passing playerid along with it. If you instead used SetTimerEx, parameters can be passed on to your function.
pawn Код:
SetTimerEx("OneSecondTimer",1000,0,"i",playerid);
But why don't you just spawn the player in OnDialogResponse?
The reason I don't spawn the player in OnDiablogResponse is because it seems to be easier the way I do it. If you look at my OnDialogResponse you might understand.

pawn Код:
if (dialogid == 2)//login
    {
    if (!response)
    {
    SendClientMessage(playerid, COLOR_RED, "SYSTEM: You must login to play.");
    Kick(playerid);
    return 1;
    }
    if (response)
    {
    LoginPlayer(playerid, inputtext);
    return 1;
    }
    }
    if (dialogid == 3)//register
    {
    if (!response)
    {
    SendClientMessage(playerid, COLOR_RED, "SYSTEM: You must register to play.");
    Kick(playerid);
    return 1;
    }
    if (response)
    {
    RegisterPlayer(playerid, inputtext);
    return 1;
    }
    }
    return 1;
Thanks for the suggestion btw.
Reply


Messages In This Thread
SetTimer - by TheCancler - 23.02.2013, 02:51
Re: SetTimer - by zDevon - 23.02.2013, 04:40
Re: SetTimer - by TheCancler - 23.02.2013, 04:52
Re: SetTimer - by zDevon - 23.02.2013, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)