[ayuda] Con los PlayerPlaySound
#1

Bueno gente de SAMP, quisiera una ayuda con el PlayerPlaySound para un cierto determinado lugar, pero pongo la funciуn y cuбndo me pongo en el point, me da muchos sonidos del PlayerPlaySound.... no sй como hacer... solo quisiera quй el PlayerPlaySound me sonarб una sola vez cuбndo yo estй en el lugar quй deseo.... espero quй me den alguna funciуn del sistema para quй suene una vez el PlayerPlaySound....

Saludos..
Reply
#2

Muestra tus cуdigos.
Reply
#3

Quote:
Originally Posted by The_M
Посмотреть сообщение
Muestra tus cуdigos.
public QuitarTextArmarioLSPD(playerid)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 254.9902,77.1988,1003.6406))
{
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
TextDrawShowForPlayer(i, ArmarioLSPD);
}
else
{
TextDrawHideForPlayer(i, ArmarioLSPD);
}
}
return 1;
}

Es un Textdraw quй hize para quй muestre unas cosas y quй al aparecer ese textdraw me de ese sonido quй pongo pero quй va no me da.... me suenan muchos el sonido quй pongo.... men si tienes otra funciуn por fa muestramela, total lo quй necesito es quй en cierto determinado lugar me suenen el sonido una solavez nadamas..
Reply
#4

Cambia playerid por i en el sonido.
Reply
#5

Quote:
Originally Posted by [J]ulian
Посмотреть сообщение
Cambia playerid por i en el sonido.
Si cambiй el playerid con el i

igual me sigue dando muchos sonidos al pararme en esa posiciуn... Si tienes otra funciуn distinta, damelo no importa pero lo quй quiero es quй suene una vez nadamas..
Reply
#6

solo una vez osea que cuando te pares ahi suene solo una vez y ya nunca mas vuelva a sonar
Reply
#7

Esa mismo men.... Es decir quй solo me paro en el lugar y quй suene una vez el sonido no tantas veces.... La quй yo hago ese metodo de funciуn, el sonido suena muchas veces y repetidas veces y yo quiero quй nadamas al pararme en el lugar solo me suene una sola vez....
Reply
#8

usa estet codigo

pawn Код:
new UnaVez;
public QuitarTextArmarioLSPD(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 254.9902,77.1988,1003.6406))
{
if(UnaVez == 1) return 1;
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
TextDrawShowForPlayer(playerid, ArmarioLSPD);
UnaVez = 1;
}
else
{
if(UnaVez == 1)
{
UnaVez = 0;
TextDrawHideForPlayer(playerid, ArmarioLSPD);
}
}
return 1;
}
Reply
#9

Quote:
Originally Posted by Miguel_Leopold
Посмотреть сообщение
usa estet codigo

pawn Код:
new UnaVez;
public QuitarTextArmarioLSPD(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 254.9902,77.1988,1003.6406))
{
if(UnaVez == 1) return 1;
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
TextDrawShowForPlayer(playerid, ArmarioLSPD);
UnaVez = 1;
}
else
{
if(UnaVez == 1)
{
UnaVez = 0;
TextDrawHideForPlayer(playerid, ArmarioLSPD);
}
}
return 1;
}

Men no me funcinу.... y ahora menos por quй ni suena el sound ni muestra el textdraw... Bueno men si tienes otra funciуn quй nadamas se escъcho al sonido una sola vez pero hazlo sin el cуdigo quй te dije, haz tu uno pero quй no tenga nada quй ver con mi codigo solo quй muestre el sonido una sola vez...
Reply
#10

Quote:
Originally Posted by Miguel_Leopold
Посмотреть сообщение
usa estet codigo

pawn Код:
new UnaVez;
public QuitarTextArmarioLSPD(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 254.9902,77.1988,1003.6406))
{
if(UnaVez == 1) return 1;
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
TextDrawShowForPlayer(playerid, ArmarioLSPD);
UnaVez = 1;
}
else
{
if(UnaVez == 1)
{
UnaVez = 0;
TextDrawHideForPlayer(playerid, ArmarioLSPD);
}
}
return 1;
}
Men disculpame Por haberte respondido tarde pero esa funciуn si me funcinу y ahora el sonido me suena una sola vez jajaja a la primera no me funcinу por un problema pero ahora si me funcinу... gracias...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)