12.05.2013, 15:50
How is
easier than
?
And then you have params to deal with. It's also slower. So let's summarise:
STRCMP:
- Slow
- Worse parameter handling
- More 'complicated' to write (relative)
ZCMD:
- Much faster
- Easy parameter handling
- Extremely easy to write
You decide which is better. It's a tough one! (not.)
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/command", true))
{
// Code
return 1;
}
else if(!strcmp(cmdtext, "/test", true))
{
// Code
return 1;
}
return 0;
}
pawn Код:
CMD:command(playerid, params[])
{
// Code
return 1;
}
CMD:test(playerid, params[])
{
// Code
return 1;
}
And then you have params to deal with. It's also slower. So let's summarise:
STRCMP:
- Slow
- Worse parameter handling
- More 'complicated' to write (relative)
ZCMD:
- Much faster
- Easy parameter handling
- Extremely easy to write
You decide which is better. It's a tough one! (not.)