21.02.2014, 18:12
Eu ia tem mandar link para vocк estudar mais isso nгo iria adiantar nada.
Entгo toma codigo pronto.
Entгo toma codigo pronto.
pawn Код:
#include <a_samp>
public OnFilterScriptInit() {
return true;
}
public OnFilterScriptExit() {
return true;
}
public OnPlayerConnect(playerid) {
return true;
}
new NaoFloda[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[]) {
if(!strcmp(cmdtext, "/ligarsom", true)) {
new Float:X, Float:Y, Float:Z;
if(NaoFloda[playerid] == 0) {
for(new i = 0; i < MAX_PLAYERS; i++) {
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInRangeOfPoint(i, 30.0, X, Y, Z)) {
NaoFloda[playerid] = 1;
PlayAudioStreamForPlayer(i, "https://www.dropbox.com/s/inhjvoxw6h1ht05/Basshunter%20-%20Now%20your%20gone.mp3", X, Y, Z, 30.0, 1);
}
}
}
return true;
}
if(!strcmp(cmdtext, "/desligarsom", true)) {
new Float:X, Float:Y, Float:Z;
for(new i = 0; i < MAX_PLAYERS; i++) {
GetPlayerPos(playerid, X, Y, Z);
if(!IsPlayerInRangeOfPoint(i, 30.0, X, Y, Z)) {
NaoFloda[playerid] = 0;
StopAudioStreamForPlayer(i);
}
}
return true;
}
return false;
}