SA-MP Forums Archive
[Ajuda] Converter OnPlayerCommandText para 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] Converter OnPlayerCommandText para ZCMD (/showthread.php?tid=478571)



Converter OnPlayerCommandText para ZCMD - Tugamars - 30.11.2013

Boas , como converte isso :

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_UP))
{
   OnPlayerCommandText(playerid,"/usaralvo1");
   OnPlayerCommandText(playerid,"/usaralvo2");
   OnPlayerCommandText(playerid,"/usaralvo3");
   OnPlayerCommandText(playerid,"/usaralvo4");
 
}
if ((newkeys==KEY_SPRINT))
{
   OnPlayerCommandText(playerid,"/usaralvo1");
   OnPlayerCommandText(playerid,"/usaralvo2");
   OnPlayerCommandText(playerid,"/usaralvo3");
   OnPlayerCommandText(playerid,"/usaralvo4");

}
return 1;
}
Para ZCMD ?


Respuesta: Converter OnPlayerCommandText para ZCMD - Tirael - 30.11.2013

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new params[1];
    if ((newkeys==KEY_UP))
    {
        cmd_usaralvo1(playerid, params);
        cmd_usaralvo2(playerid, params);
        cmd_usaralvo3(playerid, params);
        cmd_usaralvo4(playerid, params);

    }
    if ((newkeys==KEY_SPRINT))
    {
        cmd_usaralvo1(playerid, params);
        cmd_usaralvo2(playerid, params);
        cmd_usaralvo3(playerid, params);
        cmd_usaralvo4(playerid, params);

    }
    return 1;
}