Vice City Multiplayer

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

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

Code: [Select]
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, 08: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, 08:43:43 am
Yeah, I guess. Thanks though. ;)