13.04.2017, 19:54
Hola a todos nuevamente, Querнa saber si me podrнan ayudar a colocar un Chat privado para las personas que vayan en un vehнculo, Que cuando las ventanas estйn arriba solo se lean los mensajes entre ellos mismos y cuando este abajo la ventana.. Que vuelvan a tener el chat normal(Que vean todos los que estйn cerca), Este es el comando que tengo para las ventanas.. Supongo que toca aсadirlo al OnPlayerText Pero no se en que forma exactamente.. Si necesitan mas cуdigo aunque no lo creo quedo pendiente al post
PHP код:
zcmd(ven, playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
new string[128];
if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
{
VehicleWindows[GetPlayerVehicleID(playerid)] = 1;
format(string, sizeof(string), "* %s baja la ventana.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string,
COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(VehicleWindows[GetPlayerVehicleID(playerid)] == 1)
{
VehicleWindows[GetPlayerVehicleID(playerid)] = 0;
format(string, sizeof(string), "* %s sube la ventanilla.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string,
COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
}
else SendClientMessageEx(playerid, COLOR_GREY, "Usted necesita estar en el vehiculo para utilizar esta funciуn.");
return 1;
}