02.03.2017, 21:11
Let's try to debug your function. It is pretty simple idea: just see, if you even enter sufficient branch of code:
Now, try to set the circumstances that would actually execute the code under if(IsMask)..
Give it a try.
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;
}
}
Give it a try.