08.02.2015, 16:15
To create a normal zcmd command, use:
"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:
To
pawn Код:
CMD:commandname(playerid, params[])
{
// Codes
return 1;
}
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;
}
pawn Код:
CMD:test(playerid, params[])
{
SendClientMessage(playerid, -1, "This is a command using zcmd.");
return 1;
}