problema fs al compмlar.
#1

tengo un fs del ascensor(elevador) y cuando lo quiero compilar con el pawno de Zenon City. me tira 2 errores


(331) : error 017: undefined symbol "PlaySoundForPlayersInRange"
(343) : error 017: undefined symbol "PlaySoundForPlayersInRange"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

2 Errors.

331:
Код:
	PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0);
343:
Код:
PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0);
se que no esta definidio, pero como lo tendria que definir?
Reply
#2

Te recomiendo que antes de editar ese GM, empieza por cosas simples. Te dejo la respuesta, pero no es necesario que los demбs hagan tu trabajo cuando tu puedes.

pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:radio, Float:x, Float:y, Float:z)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerInRangeOfPoint(i, radio, x, y, z);
            PlayerPlaySound(i, soundid);
    return 1;
}
Reply
#3

Quote:
Originally Posted by Bu11Sh0t
Посмотреть сообщение
Te recomiendo que antes de editar ese GM, empieza por cosas simples. Te dejo la respuesta, pero no es necesario que los demбs hagan tu trabajo cuando tu puedes.

pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:radio, Float:x, Float:y, Float:z)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerInRangeOfPoint(i, radio, x, y, z);
            PlayerPlaySound(i, soundid);
    return 1;
}
Quedarнa asi ese cуdigo estб mal:

pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:radio, Float:x, Float:y, Float:z)
{
    for(new i = 0; i < MAX_PLAYERS; i++){
        if(IsPlayerInRangeOfPoint(i, radio, x, y, z)){
            PlayerPlaySound(i, soundid,x,y,z);
            }
    }
    return 1;
}
Reply
#4

Es mejor utilizar foreach, si no lo tienes, descargalo.
pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:range, Float:x, Float:y, Float:z)
{
    foreach(new i: Player)
    {
        if(IsPlayerInRangeOfPoint(i, range, x, y, z);
        {
            PlayerPlaySound(i, soundid);
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)