11.03.2014, 15:46
nгo й necessбrio a utilizaзгo de LOOP nesses comandos .
@Edit
Tem um sistema de rбdio em Textdraw que й de um Player aqui do Forum de uma olhada
Aqui
PHP Code:
#include <a_samp>
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)
{
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 30.0, X, Y, Z))
{
NaoFloda[playerid] = 1;
PlayAudioStreamForPlayer(playerid, "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;
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 30.0, X, Y, Z))
{
NaoFloda[playerid] = 0;
StopAudioStreamForPlayer(playerid);
}
return true;
}
return false;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
{
NaoFloda[playerid] = 0;
StopAudioStreamForPlayer(playerid);
}
return 1;
}
Tem um sistema de rбdio em Textdraw que й de um Player aqui do Forum de uma olhada
Aqui