Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Ettans on January 19, 2010, 06:24:40 PM

Title: OnPlayerText not recognizing ret 0?
Post by: Ettans on January 19, 2010, 06:24:40 PM
Hi. Seems that the OnPlayerText doesn't recognize return 0, here's what I used:


if(cmdtext[0] == ';')
{
    for(new i = 0; i < 41; i++)
    {
        if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid))
        {
            newvar = FindPlayerIDFromString(tmp);
            format(tmp,sizeof(tmp),"[TEAM] %s: %s",gPlayers[newvar],cmdtext[1]);
            SendClientMessage(i,COLOR_GREEN,tmp);
        }
    }
    return 0;
}


Outputs (Wrong):
Quote
Ettans: ;message
[TEAM] Ettans: message

Whereas it should output:
Quote[TEAM] Ettans: message

Any idea what's wrong or is it VC-MP bug?
Title: Re: OnPlayerText not recognizing ret 0?
Post by: Boss on January 19, 2010, 06:50:01 PM
They just probably forgot to implement not showing the text in case the callback returns false.
Title: Re: OnPlayerText not recognizing ret 0?
Post by: Ettans on January 20, 2010, 06:43:43 AM
Yeah, I guess. Thanks though. ;)