SA-MP Forums Archive
Pregunta - 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: Pregunta (/showthread.php?tid=255986)



Pregunta - Jajetin - 18.05.2011

Algo falla aqui cuando un admin quiere poner algo por /ooc no sale nada mientras que si lo pone un user funciona...

Quote:

//----------------------------------[ooc]-----------------------------------------------
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " No Estбs Conectado");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Chat de Dudas/Preguntas, Desactivado!");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Estas Silenciado..");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Utiliza: /O(OOC): [Pregunta/Duda]");
return 1;
}

if(PlayerInfo[playerid][pAdmin] < 1)
{
format(string, sizeof(string), "(( [Dudas][ID: %d] %s: %s ))",playerid, sendername, result);
OOCOff(COLOR_LIGHTBLUE,string);
printf("%s", string);
}
}
return 1;

Ayuda


Re: Pregunta - Code8976Man - 18.05.2011

Код:
if(PlayerInfo[playerid][pAdmin] < 1)
{
format(string, sizeof(string), "(( [Dudas][ID: %d] %s: %s ))",playerid, sendername, result);
OOCOff(COLOR_LIGHTBLUE,string);
printf("%s", string);
}
Ahн estб el error, solo permite si es menor que 1. Y sin embargo un poco mбs arriba se contradice.


pawn Код:
if(PlayerInfo[playerid][pAdmin]>0)



Respuesta: Pregunta - Ari3l - 18.05.2011

me ganaste xd


Respuesta: Pregunta - Jajetin - 18.05.2011

(AUN EDITANDO ESO QUE ME DIJISTEIS NO ME DEJA Y ME SIGUE SIN SALIR BIEN... HE REINICIADO EL SERV Y TODO)

Quote:

//----------------------------------[ooc]-----------------------------------------------
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " No Estбs Conectado");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Chat de Dudas/Preguntas, Desactivado!");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Estas Silenciado..");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Utiliza: /O(OOC): [Pregunta/Duda]");
return 1;
}

if(PlayerInfo[playerid][pAdmin] < 0)
{
format(string, sizeof(string), "(( [Dudas][ID: %d] %s: %s ))",playerid, sendername, result);
OOCOff(COLOR_LIGHTBLUE,string);
printf("%s", string);
}
}
return 1;


(AUN EDITANDO ESO QUE ME DIJISTEIS NO ME DEJA Y ME SIGUE SIN SALIR BIEN... HE REINICIADO EL SERV Y TODO)
y como se crea un canal extra es decir esta el OOC y el IC como se crea un canal aparte?


Respuesta: Pregunta - TiNcH010 - 18.05.2011

No te funciona como dijo Code8976Man?


Respuesta: Re: Pregunta - Ken_Block - 18.05.2011

Quote:
Originally Posted by Code8976Man
Посмотреть сообщение
Код:
if(PlayerInfo[playerid][pAdmin] < 1)
{
format(string, sizeof(string), "(( [Dudas][ID: %d] %s: %s ))",playerid, sendername, result);
OOCOff(COLOR_LIGHTBLUE,string);
printf("%s", string);
}
Ahн estб el error, solo permite si es menor que 1. Y sin embargo un poco mбs arriba se contradice.


pawn Код:
if(PlayerInfo[playerid][pAdmin]>0)
aa ami no me ayudas Kye "Foro" Kennedy


Respuesta: Pregunta - Jajetin - 18.05.2011

No, pongo /o y nada es como si no escribiera nada y luiego pongo /ooc y lo mismo(despues de /o espacio y texto obviamente xD)


Respuesta: Pregunta - Jajetin - 18.05.2011

He probado ya modificando todo y no vaaaaaaaaaaaaaa