SA-MP Forums Archive
[AYUDA] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [AYUDA] (/showthread.php?tid=546308)



[AYUDA] - Julian40MASTER - 14.11.2014

Buenas estoy haciendo un sv pero tengo un problema e puesto en return

Код:
return SendClientMessage (playerid,  0xEE1300FF, "ERROR: Ese comando no existe usa /comandos");
pero enves de que muestre el mesaje de error del comando en el chat y yo queria que lo muestra en la pantalla del juego y cambie

SendClientMessage por GameTextForPlayer asн seria

Код:
return GameTextForPlayer (playerid,  0xEE1300FF, "ERROR: Ese comando no existe usa /comandos");
pero me tira este error : error 035: argument type mismatch (argument 2)


Respuesta: [AYUDA] - jotajeda - 14.11.2014

Modo de uso:
Код:
GameTextForPlayer(Playerid, "ERROR: Ese comando no existe usa /comandos", laduraciуn en milisegundos, el estilo)



Respuesta: [AYUDA] - Julian40MASTER - 14.11.2014

Quote:
Originally Posted by jotajeda
Посмотреть сообщение
Modo de uso:
Код:
GameTextForPlayer(Playerid, "ERROR: Ese comando no existe usa /comandos", laduraciуn en milisegundos, el estilo)
Gracias men me ayudaste me funciono


Respuesta: [AYUDA] - OTACON - 14.11.2014

https://sampwiki.blast.hk/wiki/GameTextForPlayer
https://sampwiki.blast.hk/wiki/GameTextForAll


Respuesta: [AYUDA] - Julian40MASTER - 14.11.2014

Quote:
Originally Posted by OTACON
Посмотреть сообщение
gracias no sabia que estaba GameTexForALL


Respuesta: [AYUDA] - Julian40MASTER - 15.11.2014

ALGUNO SABE COMO PONERLE SONIDO AL TEX QUE E VISTO SV QUE INTRODUCE MAL UN COMANDO Y LE APARECE
EL TEXTO DE ERROR Y UN SONIDO DE COMO UN CARRO ESTRELLADO ALGO HACI


Respuesta: [AYUDA] - jotajeda - 15.11.2014

Код:
PlayerPlaySound ( playerid, sonidoid , 0.0 , 0.0 , 0.0) ;



Respuesta: [AYUDA] - Julian40MASTER - 15.11.2014

Quote:
Originally Posted by jotajeda
Посмотреть сообщение
Код:
PlayerPlaySound ( playerid, sonidoid , 0.0 , 0.0 , 0.0) ;
men lo pongo ha si ?

Код:
return GameTextForPlayer(playerid, "~r~ERROR:~w~ Ese comando no existe usa ~g~ /comandos", 3000 , 3);  
        PlayerPlaySound ( playerid, 1095, 0.0 , 0.0 , 0.0) ;



Respuesta: [AYUDA] - jotajeda - 15.11.2014

Quote:
Originally Posted by Julian40MASTER
Посмотреть сообщение
men lo pongo ha si ?

Код:
return GameTextForPlayer(playerid, "~r~ERROR:~w~ Ese comando no existe usa ~g~ /comandos", 3000 , 3);  
        PlayerPlaySound ( playerid, 1095, 0.0 , 0.0 , 0.0) ;
Asн
pawn Код:
GameTextForPlayer(playerid, "~r~ERROR:~w~ Ese comando no existe usa ~g~ /comandos", 3000 , 3);  
PlayerPlaySound ( playerid, 1095, 0.0 , 0.0 , 0.0) ;
return true;
//el return usa cuando quieras matar mas comprobaciones.

Si usas

return GameTextForPlayer(playerid, "~r~ERROR:~w~ Ese comando no existe usa ~g~ /comandos", 3000 , 3);
PlayerPlaySound ( playerid, 1095, 0.0 , 0.0 , 0.0) ;

Lo que estбs haciendo es terminar la comprobaciуn/ejecuciуn de las funciones que estйn abajo, en йste caso terminarнa en GameTextForPlayer y nunca podrб comprobar/ejecutar el PlayerPlaySound,

Resumen usa:

pawn Код:
GameTextForPlayer(playerid, "~r~ERROR:~w~ Ese comando no existe usa ~g~ /comandos", 3000 , 3);  
PlayerPlaySound ( playerid, 1095, 0.0 , 0.0 , 0.0) ;
return true;



Respuesta - Ygzeb - 15.11.2014

Una forma muy simple serнa con un stock, simplemente agregando:

pawn Код:
stock Julian(playerid) // Para llamar varias funciones a la vez.
{
GameTextForPlayer(playerid, "~r~ERROR:~w~ Ese comando no existe usa ~g~ /comandos", 3000 , 3);
PlayerPlaySound(playerid, 1095, 0.0 , 0.0 , 0.0) ;
return 1;
}
Y en el return de OnPlayerCommandText:

pawn Код:
return Julian(playerid); // Todas las funciones en una sola lнnea.
Suerte amigo