radio will stop when you get out from the car
#6

this should work

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    for(new i,m=GetMaxPlayers(); i < m; i++)
    {
         if(IsPlayerConnected(i) && Radio[i])
         {
              new string[128],
                   pName[MAX_PLAYER_NAME];
              GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
              StopAudioStreamForPlayer(i);
              Radio[i] = false;
              format(string, sizeof(string), "* %s turns off the radio.", pName);
              ProxDetector(15.0, playerid, string,
    COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)