how do i convert strcmp to ZCMD
#3

There is a Tutorial on this which I'll add after but as a quick example.

Firstly in random code and I'll add again one of your after.

pawn Код:
if(if(!strcmp(cmdtext, "/test", true))
{
    return SendClientMessage(playerid, -1, "Hello World!");
}
Would be in ZCMD:
pawn Код:
CMD:test(playerid) //You do see some with Paramaterss but my command doesn't have any.
{
    SendClientMessage(playerid, -1, "Hello World!");
    return 1;
}
Your Code:
pawn Код:
if(!strcmp(cmdtext, "/disguise", true))//dialog which tells u about the spy class disguises
    {
        if(gClass[playerid] == SPY)
        {
             ShowPlayerDialog(playerid, 88, DIALOG_STYLE_MSGBOX, "{6EF83C}Spy - Disguise Kit:", "/England\n/Soviet Union\n/Taliban\n/United States\n/Australian Armada", "Disguise ","Exit");//Replace the team1,2,3 to your game teams name and colors, by /team1 or /team2 or / team3 the player gets disguise to enemy soldier but don't changes its team
             return 1;
        }
ZCMD:
// Your command doesn't use paramters
pawn Код:
CMD:disguise(playerid) //dialog which tells u about the spy class disguises
    {
        if(gClass[playerid] == SPY)
        {
             ShowPlayerDialog(playerid, 88, DIALOG_STYLE_MSGBOX, "{6EF83C}Spy - Disguise Kit:", "/England\n/Soviet Union\n/Taliban\n/United States\n/Australian Armada", "Disguise ","Exit");//Replace the team1,2,3 to your game teams name and colors, by /team1 or /team2 or / team3 the player gets disguise to enemy soldier but don't changes its team
             return 1;
        }
      return 1;
}
Tutorial: https://sampforum.blast.hk/showthread.php?tid=231496

Okay edits are done I included an example of your code as if your like my ZCMD will just come to you.
Reply


Messages In This Thread
how do i convert strcmp to ZCMD - by Eminem 2ka9 - 10.03.2013, 21:13
Re: how do i convert strcmp to ZCMD - by MP2 - 10.03.2013, 21:16
Re: how do i convert strcmp to ZCMD - by IceCube! - 10.03.2013, 21:20
Re: how do i convert strcmp to ZCMD - by Eminem 2ka9 - 10.03.2013, 21:24
Re: how do i convert strcmp to ZCMD - by IceCube! - 10.03.2013, 21:26
Re: how do i convert strcmp to ZCMD - by Eminem 2ka9 - 10.03.2013, 21:30

Forum Jump:


Users browsing this thread: 2 Guest(s)