Quote:
Originally Posted by BenzoAMG
I'll just make it simple for you.
pawn Код:
public OnPlayerText(playerid, text[]) { if(IsPlayerInAnyVehicle(playerid)) { new str[150], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)), car = GetPlayerVehicleID(playerid); format(str, sizeof(str), "%s(%d) [CAR]: %s", name, playerid, text); for(new i = 0; i < MAX_PLAYERS; i++) //Foreach recommended. { if(!IsPlayerConnected(i)) continue; if(!IsPlayerInVehicle(i, car)) continue; SendClientMessage(i, 0xFFFF00FF, str); } } else //They aren't in a car... { //Rest of code... } return 0; }
|
Sorry for late response but this one isn't working
I mean I can't see chat when I'm not in car and I'm writing..