Converting dcmd into CMD: (rep++)
#1

Is there any way that i can convert whole lux admin system in to CMD: "zcmd"??
Cuz i want to add onduty cmd into my script but i can't using dcmd?? Will i can add using CMD??
Reply
#2

Of course there is a way,learn ZCMD
Reply
#3

Ok thnx But i want to make Admin class and only admin can get it.. How can i make it??
Reply
#4

Define a variable for admins in your player's enumeration like pAdmin,and then on every command perform a check like PlayerInfo[playerid][pAdmin],check the level,etc.
Reply
#5

Why can't you just do it using dcmd?
Reply
#6

I suggest you learn how to add a command in dcmd before converting your whole command processor.

Quote:
Originally Posted by Shetch
Посмотреть сообщение
Why can't you just do it using dcmd?
snap!
Reply
#7

Why don't you add onduty and offduty cmds in your gamemode itself, instead of editing luxadmin ?
Reply
#8

Yes i did. I also add include of ladmin on top of my script:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmd, "/onduty", true) == 0)
    {
    if(IsPlayerLuxAdminLevel(playerid,4))
    {
    SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid,38,500000); SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,pink);
    }
    else SendClientMessage(playerid, COLOR_RED, "ERROR: You not is Administrator Level 4");
    return 1;
    }
    return 0;
}
===> But it is showing this error:
pawn Код:
D:\Game\SA-MP Files\Special Force Wars\gamemodes\Wars.pwn(698) : error 017: undefined symbol "cmd"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#9

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/onduty", true) == 0)
    {
    if(IsPlayerLuxAdminLevel(playerid,4))
    {
    SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid,38,500000); SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,pink);
    }
    else SendClientMessage(playerid, COLOR_RED, "ERROR: You not is Administrator Level 4");
    return 1;
    }
    return 0;
}

Should be cmdtext rather than cmd since cmdtext is defined as in the callback.
Reply
#10

So how can i make /Offduty please only one Last Request?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)