Converting dcmd into CMD: (rep++) -
iOmar - 12.04.2012
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??
Re: Converting dcmd into CMD: (rep++) -
Cjgogo - 12.04.2012
Of course there is a way,learn ZCMD
Re: Converting dcmd into CMD: (rep++) -
iOmar - 12.04.2012
Ok thnx But i want to make Admin class and only admin can get it.. How can i make it??
Re: Converting dcmd into CMD: (rep++) -
Cjgogo - 12.04.2012
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.
Re: Converting dcmd into CMD: (rep++) -
Shetch - 12.04.2012
Why can't you just do it using dcmd?
Re: Converting dcmd into CMD: (rep++) -
Rachael - 12.04.2012
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!
Re: Converting dcmd into CMD: (rep++) -
Mark™ - 12.04.2012
Why don't you add onduty and offduty cmds in your gamemode itself, instead of editing luxadmin ?
Re: Converting dcmd into CMD: (rep++) -
iOmar - 12.04.2012
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.
Re: Converting dcmd into CMD: (rep++) -
Mark™ - 12.04.2012
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.
Re: Converting dcmd into CMD: (rep++) -
iOmar - 12.04.2012
So how can i make /Offduty please only one Last Request?