11.04.2012, 14:55
I have Lux Admin System.It contain "dcmd" .I want to add /onduty cmd which uses strcmp. So how can i add strcmp cmds in Lux Admin System??
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/yourcmd", cmdtext, true) == 0)
{
//Function
return 1;
}
return 0;
}
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7807) : error 017: undefined symbol "PlayerInfo"
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7807) : warning 215: expression has no effect
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7807) : error 001: expected token: ";", but found "]"
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7807) : error 029: invalid expression, assumed zero
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7807) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
if(strcmp(cmd, "/onduty", true) == 0)
{
Line # 7807 if(PlayerInfo[playerid][Level] >= 2) {
CMDMessageToAdmins(playerid,"Now On Duty"); GetPlayerName(playerid, adminname, sizeof(adminname));
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1) {
SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid,38,500000); SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,pink); format(string,256,"Administrator %s Has Now On Admin Duty",adminname); SendClientMessage(i,pink,string); }
}
} else {
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); }
return 1; }
enum pInfo
{
Level
};
new PlayerInfo[MAX_PLAYERS][pInfo];