[ajuda] unknown command - 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] unknown command (
/showthread.php?tid=354996)
[ajuda] unknown command -
F_Cinco - 28.06.2012
Comando:
pawn Code:
CMD:darvida(playerid,params[])
{
if(IsPlayerAdmin(playerid))
if(params[0] == 0)
{
SendClientMessage(playerid,-1,"Uso: /darvida [id]");
}
else
{
if(IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"[INFO] Player Offline!");
SetPlayerArmour(playerid,75);
SetPlayerHealth(playerid,80);
}
return 1;
}
1є - O comando estб correto?
2є - Estou digitando o comando e da: serve: unknown command
:S
Re: [ajuda] unknown command -
Maklister - 28.06.2012
Por Que nao Define o sscanf ?
pawn Code:
CMD:darvida(playerid, params[])
{
new Vida;
if(PlayerInfo[playerid][pAdmin] < VALORDOADMIN) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Voce Nao Tem Level Admin Suficiente");
if(sscanf(params, "ui", ID, Vida)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Use /darvida [ID] [VIDA]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[INFO] Player Offline!");
if(Vida < 0 || Vida > 100) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Valor Invбlido! Use de 0 a 100");
SetPlayerHealth(ID, Vida);
format(String, sizeof(String), " O Administrador %s Setou Sua Vida para %d", nome(playerid), Vida);
SendClientMessage(playerid, -1, String);
return 1;
}
Re: [ajuda] unknown command -
F_Cinco - 28.06.2012
hm.
como assim definir o sscanf?
compilou com sucesso, porйm in-game da unknown command tbm, ox :S
Re: [ajuda] unknown command -
.FuneraL. - 28.06.2012
Hб algo em seu OnPlayerCommandPerformed? , porque pelo jeito estб correto o comando do Murilo.
Re: [ajuda] unknown command -
F_Cinco - 28.06.2012
Quote:
Originally Posted by .FuneraL.
Hб algo em seu OnPlayerCommandPerformed? , porque pelo jeito estб correto o comando do Murilo.
|
sim!
isso:
pawn Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
SendClientMessage(playerid, -1, "[x] Comando Inexistente!");
}
return 1;
}
Re: [ajuda] unknown command -
.FuneraL. - 28.06.2012
Quote:
Originally Posted by F_Cinco
sim!
isso:
pawn Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) { SendClientMessage(playerid, -1, "[x] Comando Inexistente!"); } return 1; }
|
Vish :> , Agora sim que nгo entendi o porque do Unknown Command em Jogo se estб tudo Correto o.O