well i already did it but i have a problem here is the cmd
pawn Код:
if(strcmp(cmd, "/windows", true) == 0)
{
new strh[256];
new player[MAX_PLAYER_NAME];
new vehicleid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, player, sizeof(player));
if(IsPlayerInAnyVehicle(playerid))
if(WindowsR[playerid] == 1)
{
WindowsR[playerid] = 0;
SendClientMessage(playerid,0x0089FFC6,"[Vehicle]: You rolled your vehicle windows down");
format(strh, sizeof(strh), "** %s: rolled down the windows of the vehicle %s **", player, GetVehicleName(vehicleid));
ProxDetector(15.0, playerid, strh, COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK);
return 1;
}
else
{
WindowsR[playerid] = 1;
SendClientMessage(playerid,0x0089FFC6,"[Vehicle]: You rolled your vehicle windows up");
format(strh, sizeof(strh), "** %s: rolled up the windows of the vehicle %s **", player, GetVehicleName(vehicleid));
ProxDetector(15.0, playerid, strh, COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK);
return 1;
}
return 1;
}
and mine on playertext
pawn Код:
if(WindowsR[playerid] == 1)
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( !IsPlayerInAnyVehicle( playerid ) && i != playerid && !IsPlayerInAnyVehicle( i ))
return true;
else if( !IsPlayerInAnyVehicle( playerid ) && i != playerid && IsPlayerInAnyVehicle( i ))
return false;
}}
but my problem now its if your outise the car and you talk i can hear with the windows rolled up but if i talk with the windows rolled up you cant hear so i want if the windows are rolled up i cant hear nothing what your talking outside the car (im inside the car dont forgot)...