ERROR: Must be assigned to an array | with random messages
#5

I do use it in another place.
pawn Code:
public OnPlayerWinContest(playerid)
{
    new pName[MAX_PLAYER_NAME],string[128]; // A pName variable for the player's name, and a string to output.
    GetPlayerName(playerid,pName,sizeof pName); //Get's the player's name.
    format(string,sizeof string,"Player %s has won the contest and has won %d!",pName,CONTEST_PRIZE);
    SendClientMessageToAll(0x00FFFFFF,string); //Same color, and it outputs a string.
    GivePlayerMoney(playerid,CONTEST_PRIZE);
    ContestAnswer = -1;
    return 1;
}
pawn Code:
public OnPlayerText(playerid, text[])
{
    if(strval(text) == ContestAnswer && ContestAnswer != -1)
    {
        OnPlayerWinContest(playerid);
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)