[Ajuda] Comando /n - 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] Comando /n (
/showthread.php?tid=638891)
Comando /n -
Brenopwn - 07.08.2017
Ola oque esta de errado neste comando que nao envia a mensagem que o player digita exemplo:
Ex: /n Como faзo tal coisa
Em vez de aparecer Player tal DIZ: como faзo tal coisa aparece : Uso correto: /novato [Mensagem
PHP код:
CMD:n(playerid, params[])
{
new string[128], Texto[200];
if(sscanf(params, "s[128]", string)) return SendClientMessage(playerid, -1, "Uso correto: /novato [Mensagem]");
new nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, nome, sizeof(nome));
format(Texto, 128, "%s Diz: %s", nome, string);
SendClientMessage(i, GetPlayerColor(playerid), Texto);
return true;
}
Re: Comando /n -
IlanZ - 07.08.2017
PHP код:
CMD:novato(playerid, params[])
{
new Texto[128];
if(GetPlayerScore(playerid) > 5) return SendClientMessage(playerid, -1, "Vocк nгo й um NOVATO!");
if(isnull(params)) return SendClientMessage(playerid, -1, "Uso correto: /novato [Mensagem]");
new nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, nome, sizeof(nome));
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerScore(i) < 5)
{
format(Texto, 128, "Chat Noob %s nivel[%d]: %s", nome, GetPlayerScore(playerid), params);
SendClientMessage(i,-1, Texto);
}
}
return true;
}
Re: Comando /n -
Brenopwn - 07.08.2017
PHP код:
(200) : error 017: undefined symbol "score"
PHP код:
linha 200 format(Texto, 128, "Chat Noob %s nivel[%d]: %s", nome, score, params);
linha 201 SendClientMessage(i,-1, Texto);
linha 202 }