STRCMP > DCMD
#1

Hi guys, i need quick help.

How I am enable to transform STRCMP to DCMD?

Do i need to change some code or just re-paste it into the dcmd form.

thanks..
Reply
#2

Dcmd is in fact a glorified strcmp so it's not really much use. Use ZCMD or YCMD. Commands without parameters can be converted one-on-one, commands with parameters will need tweaks, depending on how they are currently handled.
Reply
#3

Oh thanks for reply! But i already tryed some ZCMD, but... for some reason I just cant work with it, DCMD is old style, just for me.

What do you need, should I post you my script to look at it, what "handeling" is it or?
Reply
#4

I mean, how long do i have to wait to respond on that much popular forums?
Reply
#5

Here's the forum rules:

Quote:
Originally Posted by Forum Rules
No Double Posting - There is a modify button , use it. However, bumping a topic in which you have or require further information is allowed after at least 24 hours. Note that two identical posts appearing at the same time is usually a mistake attributed to lag, and will not be penalized (but the second one will be removed).
http://forum.sa-mp.com/announcement.php?f=12

Zcmd is very easy to use, and is more efficient/faster than using dcmd or strcmp, i would highly recommend using it.
I haven't used dcmd for commands, so i don't know how it's different than strcmp, but you could try to convert it, and see if errors come, then fix them accordingly.
Reply
#6

Its super, I readed the rules, but I need help quick, I do not have time to wait 15 days to get answer. I need to bumping my gamemode fast that I can get it into my server.

However, I will use zcmd, how I can convert the command?
Reply
#7

To create a normal zcmd command, use:
pawn Код:
CMD:commandname(playerid, params[])
{
    // Codes
    return 1;
}
"COMMAND:" or "params" can also be used.
However, depending on how your strcmp command codes are scripted, you may have to tweak additional code as Vince also said.

If none of the code has to be tweaked, you would just convert it like this example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "test", true))
    {
    SendClientMessage(playerid, -1, "This is a command using strcmp.");
        return 1;
    }
    return 0;
}
To
pawn Код:
CMD:test(playerid, params[])
{
    SendClientMessage(playerid, -1, "This is a command using zcmd.");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)