[Ajuda] OnPlayerKeyStateChange || 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] OnPlayerKeyStateChange || ZCMD (
/showthread.php?tid=520791)
OnPlayerKeyStateChange || ZCMD -
unamed - 20.06.2014
em strcmp ficaria ssim
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys == KEY_SPRINT))
{
OnPlayerCommandText(playerid,"/comandoteste");
}
return 1;
}
mas como ficaria em zmcd? vlw
Re: OnPlayerKeyStateChange || ZCMD -
ipsLuan - 20.06.2014
Tenta isso:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys == KEY_SPRINT))
{
cmd_comandoteste(playerid, params);
}
return 1;
}
Re: OnPlayerKeyStateChange || ZCMD -
unamed - 20.06.2014
nao da
Re: OnPlayerKeyStateChange || ZCMD -
ipsLuan - 20.06.2014
Deu algum erro? Ou nгo pegou?
Re: OnPlayerKeyStateChange || ZCMD -
unamed - 20.06.2014
Consegui finalmente. Tive que tirar os parametros do comando
pawn Код:
//Comando
CMD:comando(playerid) { return 1; }
// Public
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys == KEY_SPRINT))
{
cmd_comando(playerid);
}
return 1;
}
Postei a resoluзгo assim poderei ajudar outros quando virem este topico.
Obrigado xCR7
Re: OnPlayerKeyStateChange || ZCMD -
ipsLuan - 20.06.2014
Tranquilo.