Ahhh, OnPlayerText..
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME], msg[128];
    GetPlayerName(playerid, name, sizeof(name));
    format(msg, sizeof(msg), "{00FFFF}(%d) {ffffff}%s", playerid, text);
    SendPlayerMessageToAll(playerid, msg);

    switch(xTestBusy)
    {
        case true:
        {
            if(!strcmp(xChars, text, false))
            {
                new string[128], pName[MAX_PLAYER_NAME];
                GetPlayerName(playerid, pName, sizeof(pName));
                format(string, sizeof(string), "« %s has won the reaction test. »", pName);
                SendClientMessageToAll(GREEN, string);
                format(string, sizeof(string), "« You have earned $%d + %d score points. »", xCash, xScore);
                SendClientMessage(playerid, GREEN, string);
                GivePlayerMoney(playerid, xCash);
                SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
                xReactionTimer = SetTimer("xReactionTest", TIME, 1);
                xTestBusy = false;
            }
        }
    }

    return 0;
}
Reply


Messages In This Thread
Ahhh, OnPlayerText.. - by LeeXian99 - 04.04.2013, 13:59
Re: Ahhh, OnPlayerText.. - by SuperViper - 04.04.2013, 14:07
Re: Ahhh, OnPlayerText.. - by zxc1 - 04.04.2013, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)