22.11.2012, 15:22
top of the script
OnGamemodeInit
It doesn't play the music when near the point?
I have tried doing it on a command like.
and it works when i type it near the point.
But i want it to play automatically..
Can you help? +rep
Quote:
forward musicstall(playerid); |
Quote:
SetTimer("musicstall", 1000, false); |
Quote:
public musicstall(playerid) { if(IsPlayerInRangeOfPoint(playerid, 5.0,1478.8761,-1666.3502,14.5532)) { PlayAudioStreamForPlayer(playerid, "http://lackofstyle.com/mp3s/bing_lookalotlikexmas.mp3"); } } |
I have tried doing it on a command like.
Код:
if(strcmp("/startmusicnearpoint", cmdtext, true, 10) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid, 5.0,1478.8761,-1666.3502,14.5532)) { PlayAudioStreamForPlayer(playerid, "http://lackofstyle.com/mp3s/bing_lookalotlikexmas.mp3"); } } return 1; }
But i want it to play automatically..
Can you help? +rep