Converting dcmd to zcmd
#1

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.

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;
}
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.
Reply


Messages In This Thread
Converting dcmd to zcmd - by _Outbreak_ - 07.05.2011, 12:54
AW: Converting dcmd to zcmd - by Nero_3D - 07.05.2011, 14:18
Re: Converting dcmd to zcmd - by DRIFT_HUNTER - 07.05.2011, 14:27
Re: Converting dcmd to zcmd - by Calgon - 07.05.2011, 14:29
Re: Converting dcmd to zcmd - by DRIFT_HUNTER - 07.05.2011, 14:31
Re: Converting dcmd to zcmd - by Calgon - 07.05.2011, 14:34
Re: Converting dcmd to zcmd - by Artix - 17.05.2011, 22:41

Forum Jump:


Users browsing this thread: 1 Guest(s)