[Ayuda] Con estos comandos - 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] Con estos comandos (
/showthread.php?tid=308977)
[Ayuda] Con estos comandos -
[Nikk] - 05.01.2012
Miren, estoy armando un server en inglees y tengo problemas con 2 comandos
Uno es admin say y otro es un mensaje para el team (Server tdm )
pawn Код:
CMD:t(playerid, params[])
{
foreach(Player, i)
{
if(gTeam[i] == gTeam[playerid])
{
new string[128], pName[24];
GetPlayerName(playerid,pName,24);
format(string,sizeof(string),"TeamChat: %s says: %s",pName,params);
SendClientMessage(i, YELLOW, string);
}
}
return 0;
}
CMD:asay(playerid, params[])
{
foreach(Player, i)
{
if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
{
new string[128], pName[24];
GetPlayerName(playerid,pName,24);
format(string,sizeof(string),"{00FF00}<!>- Administrator %s says: %s -<!>",pName,params);
SendClientMessage(i, YELLOW, string);
}
}
return 0;
}
Lo que pasa es: El comando andaa perfectoo pero al actuar el comando actua la funcion del return 0 en onplayercommandperformance...
Por que ? Me dice que el cmd no existe pero a la vez anda :/
Respuesta: [Ayuda] Con estos comandos -
Jovanny - 05.01.2012
por que tienes que poner return 1;