Help please.
#1

i am wondering how to use one command to do multiple things
i want /cmds to give a list of command based on what admin level you are
--------------------------------------------------------------------------------------
if (strcmp("/cmds", cmdtext, true, 10) == 0) // Shows Admin Command List
{
if(PlayerAdminLevel[playerid] == 2)
{
SendClientMessage(playerid,0xA9A9A9AA, "|_Server Admin Commands_| Level 2 ~ION~ Admin");
SendClientMessage(playerid,0x00FF00FF,"/kick (id) [Kick] /ann (text) [Announce]");
SendClientMessage(playerid,0x00FF00FF,"/akill (id) [Kill Player]");
SendClientMessage(playerid,0x00FF00FF,"/spec (id) [Spectate Player] /specoff");
SendClientMessage(playerid,0x00FF00FF,"/unmute (id) [Reason] ");
SendClientMessage(playerid,0x00FF00FF,"/warn (id) (reason)");
SendClientMessage(playerid,0x00FF00FF,"/adweb [Advertise website.] /rpwarn (id) abusing rp command warning");
SendClientMessage(playerid,0x00FF00FF,"/MakeArmy (id) Recruit a player to army");
}
else
SendClientMessage(playerid,0xFF0000AA,"Bad Command. Type /commands for available commands depending on your chosen job/skill");
return 1;
}

if (strcmp("/cmds", cmdtext, true, 10) == 0) // Shows Admin Command List
{
if(PlayerAdminLevel[playerid] == 1)
{
SendClientMessage(playerid,0xA9A9A9AA, "|_Server Admin Commands_| Level 1 ~ION~ Helper");
SendClientMessage(playerid,0x00FF00FF,"/spec (id) [Spectate Player] /specoff");
SendClientMessage(playerid,0x00FF00FF,"/ac (msg) [Talk To Admins] /aspawn (id) Forced Spawn");
SendClientMessage(playerid,0x00FF00FF,"/warn (id) (reason) /info (id) Gets Basic player information");
}
else
SendClientMessage(playerid,0xFF0000AA,"Bad Command. Type /commands for available commands depending on your chosen job/skill");
return 1;
}

==============================
the command will only work for one admin level. and not both of them however renaming the commands
to cmds1 cmds2 cmds3 Etc.... works fine
Reply


Messages In This Thread
Help please. - by ionaustinb - 27.06.2011, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)