Onplayertext problem!
#2

Let's try to debug your function. It is pretty simple idea: just see, if you even enter sufficient branch of code:

pawn Код:
for( new i = 0; i != MAX_PLAYERS; i++ )
{
    if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
    {
        if(GetPlayerVehicleID(i) == vehicleid)
        {
            if(IsMask[playerid] == 1)
            {
                printf("Entering the branch"); // <<<<
                format(string, sizeof(string), "(VEHICLE)  Stranger says: %s", text);
                SendClientMessage(i, COLOR_FADE2, string);
                printf("Exiting the branch"); // <<<<
            }
            else
            {
                format(string, sizeof(string), "(VEHICLE) %s says: %s", sendername, text);
                SendClientMessage(i, COLOR_FADE2, string);

            }
            return 0;
        }
    }
Now, try to set the circumstances that would actually execute the code under if(IsMask)..
Give it a try.
Reply


Messages In This Thread
Onplayertext problem! - by daghost111 - 02.03.2017, 19:06
Re: Onplayertext problem! - by LetsOWN[PL] - 02.03.2017, 21:11
Re: Onplayertext problem! - by Toroi - 02.03.2017, 22:11
Re: Onplayertext problem! - by daghost111 - 12.03.2017, 15:57
Re: Onplayertext problem! - by LEOTorres - 12.03.2017, 16:09
Re: Onplayertext problem! - by daghost111 - 12.03.2017, 16:26
Re: Onplayertext problem! - by LEOTorres - 12.03.2017, 16:38

Forum Jump:


Users browsing this thread: 1 Guest(s)