07.05.2011, 12:54
I'm looking at converting my commands from dcmd to zcmd. The way i have my commands at the moment, for admins and players makes it really easy to move commands.
That's a little example how my commands are laid out. So if I wanted to make ban a level 2 command I would just cut and paste "dcmd(ban,3,cmdtext);"
Is there a way i could do something like this with zcmd? I know the layout is different, and OnPlyerCommandText isn't used like it is in dcmd. I just don't really want to go to the command itself when i want to change who can use it, or for setting certain restrictions on command usages.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(IsPlayerRegistered(playerid, name(playerid)) && PlayerNotSpawned[playerid])
return SendClientMessage(playerid, COLOR_RED, "You must spawn first before using commands.");
if(playerMod(playerid))
{
dcmd(ban,3,cmdtext);
}
if(playerAdmin(playerid))
{
dcmd(unban,5,cmdtext);
}
return 0;
}
Is there a way i could do something like this with zcmd? I know the layout is different, and OnPlyerCommandText isn't used like it is in dcmd. I just don't really want to go to the command itself when i want to change who can use it, or for setting certain restrictions on command usages.