[Ajuda] Comando em zcmd - 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 em zcmd (
/showthread.php?tid=457305)
Comando em zcmd -
NuTShoT - 11.08.2013
Olб, boa noite!
Estou aprendendo a mexer com zcmd, porйm nгo estou conseguindo fazer um comando.
pawn Код:
CMD:par(playerid,params[])
{
new id, mensagem;
if(sscanf(params, "ds", id, mensagem))
return SendClientMessage(playerid, -1, "USO: /par [ID] [MENSAGEM]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, -1, "O player informado nгo estб online!");
if(PlayerInfo[playerid][AdminLevel] < 1 && PlayerInfo[id][AdminLevel] < 1)
return Negado
format(String, sizeof(String), "{FFFF00}Particular enviada para %s [ID:%d]", PlayerName(id), id);
SendClientMessage(playerid, -1, String);
format(String, sizeof(String), "{FFFF00}Particular: %s •• %s [ID:%d]", mensagem, PlayerName(playerid), id);
SendClientMessage(id, -1, String);
return 1;
}
O erro estб aqui:
pawn Код:
if(sscanf(params, "ds", id, mensagem))
Mas o que acontece ?!
A mensagem nгo aparece .-.
@off, o fуrum ta caindo toda hora sу aqui ?!
Vlw!
Re: Comando em zcmd -
TheKoDaK - 11.08.2013
pawn Код:
if(sscanf(params, "is[148]", id, mensagem))
Tenta ae
Re: Comando em zcmd -
darkxdll - 11.08.2013
pawn Код:
new id, mensagem[100];
if(sscanf(params, "us[100]", id, mensagem))
Tente deste modo
Re: Comando em zcmd -
NuTShoT - 11.08.2013
Olб, boa noite!
Funcionou.
Outro errinho basico. :P
pawn Код:
new Float:vida;
GetPlayerHealth(id, vida);
format(String, sizeof(String), "O player tem %d de vida!", vida);
SendClientMessage(playerid, -1, String);
Por que a vida fica um valor muito alto ?! Sempre aparece assim:
O player tem 14115654494 de vida!
Vlw!
Re: Comando em zcmd -
Gii - 11.08.2013
pawn Код:
format(String, sizeof(String), "O player tem %f de vida!", vida);
Re: Comando em zcmd -
NuTShoT - 11.08.2013
Obrigado! Vlw a todos.