04.02.2014, 18:02
Is that good?
Код:
#include <a_samp> new OneTimeOnly[MAX_PLAYERS]; public OnPlayerUpdate(playerid) { if(OneTimeOnly[playerid] == 0) { if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z) { PlayAudioStreamForPlayer(playerid, "link"); OneTimeOnly[playerid] = 1; } else { StopAudioStreamForPlayer(playerid); } if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z)) { PlayAudioStreamForPlayer(playerid, "link"); OneTimeOnly[playerid] = 1; } if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z) { PlayAudioStreamForPlayer(playerid, "link"); OneTimeOnly[playerid] = 1; } if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z) { PlayAudioStreamForPlayer(playerid, "link"); OneTimeOnly[playerid] = 1; } if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z)) { PlayAudioStreamForPlayer(playerid, "link"); OneTimeOnly[playerid] = 1; } } return 1; }