SA-MP Forums Archive
[Ajuda] chat noob - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] chat noob (/showthread.php?tid=643715)



chat noob - MediaCL - 25.10.2017

Boa noite, coloquei um chat noob no meu servidor
e estou com o seguinte problemas WARNINGS
Quote:

C:\Users\Renato\Desktop\Brasil Play Roox RPG\gamemodes\oloco.pwn(24691) : warning 225: unreachable code
C:\Users\Renato\Desktop\Brasil Play Roox RPG\gamemodes\oloco.pwn(24692) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Renato\Desktop\Brasil Play Roox RPG\gamemodes\oloco.pwn(24712) : warning 202: number of arguments does not match definition
C:\Users\Renato\Desktop\Brasil Play Roox RPG\gamemodes\oloco.pwn(24777) : warning 202: number of arguments does not match definition

Linha 24691
Quote:

GetPlayerName(playerid, sendername, sizeof(sendername));

Linha 24711
Quote:

SendClientMessage(playerid,0x33CCFFAA);

Linha 24716
Quote:

}

Codigo COMPLETO
Quote:

if (strcmp(cmd, "/noob", true) == 0)
{
if(PlayerInfo[playerid][pMuted] == 1)return SendClientMessage(playerid, TEAM_CYAN_COLOR, "Vocк nгo pode falar, pois foi calado");
if(PlayerInfo[playerid][pLevel] >= 1)
{
return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/n)oob [Chat Noob]");

GetPlayerName(playerid, sendername, sizeof(sendername));
new result[128];
//Anti Divulguer

if(gettime() < GetPVarInt(playerid, #VarFlood3))
return SendClientMessage(playerid, COLOR_GRAD1, #Vocк nгo pode usar este comando com tanta frequencia);
SetPVarInt(playerid, #VarFlood3, gettime()+2);

if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 1){

format(string, sizeof(string), "{669999}Chat Noob ({FFFFFF}/noob{669999}) [{33CCFF}Nivel %d{669999}] %s: %s",PlayerInfo[playerid][pLevel], sendername, result);
}
else if(PlayerInfo[playerid][pHelper] >= 1){

format(string, sizeof(string), "{669999}Chat Noob ({FFFFFF}/noob{669999}) [{33CCFF}Helper{669999}] %s: %s",sendername, result);
}
else if(PlayerInfo[playerid][pAdmin] >= 1){

format(string, sizeof(string), "{669999}Chat Noob ({FFFFFF}/noob{669999}) [{33CCFF}Admin{669999}] %s: %s",sendername, result);
}
SendClientMessage(playerid,0x33CCFFAA);
printf("Chat Noob %s: %s", sendername, result);
return true;
}
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um noob.");
}




Re: chat noob - C4rtm4n - 25.10.2017

https://sampforum.blast.hk/showthread.php?tid=336052


Re: chat noob - zCyan - 25.10.2017

ERRADO:
Код:
SendClientMessage(playerid,0x33CCFFAA);
CERTO:
Код:
SendClientMessageToAll(0x33CCFFAA,string);



Re: chat noob - MediaCL - 25.10.2017

Ainda nгo deu certo
pois eu peguei o chat noob do Brasil Project Show e ele e em CMD:
eu uso strcmp aff



Re: chat noob - DelK - 25.10.2017

Linha 24691, e substitua oque tinha de sendername por name
PHP код:
 new name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name)); 
Linha 24711.
PHP код:
SendClientMessageToAll(0x33CCFFAAstring); 
tб faltando mais linhas e vocк nem falou qual o erro da linha 24716.


Re: chat noob - MrEdu - 26.10.2017

Pergunta, isso й um comando pra "noobs" se comunicarem ou й uma interaзгo rбpida entre "noob" e admin?


Re: chat noob - DelK - 26.10.2017

Quote:
Originally Posted by MrEdu
Посмотреть сообщение
Pergunta, isso й um comando pra "noobs" se comunicarem ou й uma interaзгo rбpida entre "noob" e admin?
Isso й um chat meio que para quem for amador, receber assistкncias e tкm em vбrios servers de rp - rpg.


Re: chat noob - MrEdu - 26.10.2017

Um chat entre "noobs" ou entre "noob" e admin pra facilitar a comunicaзгo e ajuda?


Re: chat noob - Benner - 26.10.2017

Quote:
Originally Posted by MrEdu
Посмотреть сообщение
Um chat entre "noobs" ou entre "noob" e admin pra facilitar a comunicaзгo e ajuda?
Chat noob seria um chat entre players que tem level 0 ate 20 mais ou menos a onde eles digita /cn [texto] ai eles falam entre sн e os adm tem acesso a esse chat assim ajudando os noob ou os proprio noob se ajuda й muito famoso em RP/RPG.


Re: chat noob - MrEdu - 26.10.2017

Entendi, jб mando o code