11.03.2014, 15:16
(
Last edited by LuxurioN™; 11/03/2014 at 05:30 PM.
)
Quote:
Todos os tуpicos que estiverem a infringir alguma regra serгo excluнdos sem aviso prйvio.
Regras:
|
1:eu queria po tipo um anuncio de radios pra vazer varias escolhas q esse so tem uma musica
2:ele ta meio bugado quando entro no carro continuoolvino ai saio do carro a musica para
3:quando digito /desligarsom ele nao desliga tipo se eu nao digitar /desligarsom ele nao libera pra min ligar e tanbem nao desliga
me ajuda ai por favor

PHP Code:
#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, Float:Distance = 30.0;
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, "http://dl.dropboxusercontent.com/s/wkq9pvf6dsgraz4/MC_Marcelly_Bigode_Grosso__CLIPE_OFICIAL__TOM_PRODU_ES_2013.mp3", X, Y, Z, Distance, 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;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
// If the player exits a vehicle
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
{
StopAudioStreamForPlayer(playerid); // Stop the audio stream
}
return 1;
}