Author Topic: OnPlayerText not recognizing ret 0?  (Read 2976 times)

0 Members and 1 Guest are viewing this topic.

Offline Ettans

  • VC:MP Beta Tester
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
OnPlayerText not recognizing ret 0?
« 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?

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: OnPlayerText not recognizing ret 0?
« Reply #1 on: January 19, 2010, 08:50:01 pm »
They just probably forgot to implement not showing the text in case the callback returns false.

Offline Ettans

  • VC:MP Beta Tester
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: OnPlayerText not recognizing ret 0?
« Reply #2 on: January 20, 2010, 08:43:43 am »
Yeah, I guess. Thanks though. ;)