CMD:help(playerid, params[])
{
if (!strcmp(params, "general", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : General commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/stats, /report, /helpme, /acc, /me, /do, /(s)hout, /(o)oc, /inventory, /switch.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/approve, /faq, /sell, /paint, /drink, /bank, /cook, /vest, /ammo, /usekit, /phone.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/id, /call, /hangup, /text, /drop, /flist, /crates, /fill, /pay, /gps, /open, /usedrug.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/animcmds, /backpack, /boombox, /channel, /jobcmds, /supporters, /disablecp, /stopanim.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/shakehand, /showlicense, /frisk, /toghud, /passwep, /setradio, /picklock, /resetvw. /factionhelp.");
}
if (!strcmp(params, "account", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Account Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/changepass, /lastlogged, /username, /properties.");
}
if (!strcmp(params, "vehicle", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Vehicle Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/park, /lock, /abandon, /refuel, /unmod, /trunk, /listcars, /engine, /lights, /hood, /tow.");
}
if (!strcmp(params, "business", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Business Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/buy, /abandon, /lock, /vault, /products, /binfo, /bname, /bmessage, /bshipment.");
}
if (!strcmp(params, "house", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : House Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/buy, /abandon, /lock, /storage, /furniture, /buyrack, /gunrack, /deleterack.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/doorbell, /switch.");
}
if (!strcmp(params, "property", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Property Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/buy, /abandon, /lock, /housecmds, /products, /vault, /binfo, /bizcmds.");
}
if (!strcmp(params, "Helper", true))
{
if (!PlayerData[playerid][pTester]) { return SendClientMessage(playerid, COLOR_NICEBLUE, "SERVER: You cannot use this command");
}
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Helper Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/t, /tduty, /ah, /dh, /kick");
}
else if (!strcmp(params, "admin", true))
{
if (!PlayerData[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_NICEBLUE, "SERVER: You cannot use this command");
}
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Administrator Commands : : .");
if (PlayerData[playerid][pAdmin] >= 1) {
SendClientMessage(playerid, COLOR_NICEBLUE, "/a, /reports, /spectate, /ajail, /release, /kick, /mute, /unmute, /freeze, /unfreeze.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/aduty, /ban, /skin /goto /aremovecall");
}
if (PlayerData[playerid][pAdmin] >= 2) {
SendClientMessage(playerid, COLOR_NICEBLUE, "/respawn, /warn, /checkstats, /shooter, /goto, /bring, /setinterior, /setvw.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/sendto, /clearchat, /spawn, /refill, /revive, /aslap, /acceptname, /declinename, /atalk.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/masked, /listguns, /respawncar, /respawncars, /respawnnear, /heal, /bringcar, /gotocar.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/x /y /z");
}
if (PlayerData[playerid][pAdmin] >= 3) {
SendClientMessage(playerid, COLOR_NICEBLUE, "/unban, /blacklist, /getip, /togooc, /health, /armor, /resetweps, /arepair, /listwarns.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/entercar, /flipcar, /veh, /destroyveh, /near, /healall, /tracenumber, /bleeding.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/atune, /acolorcar, /apaintjob, /afire, /akillfire, /adestroybox.");
}
if (PlayerData[playerid][pAdmin] >= 4) {
SendClientMessage(playerid, COLOR_NICEBLUE, "/givewep, /settester, /baninfo, /setname, /asetfaction, /asetrank, /setitem.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/asellhouse, /asellbiz, /jetpack, /setweather, /setfuel, /setcarhp, /spawnitem.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/setquantity, /destroyitem, /setplayer, /setleader, /setinventory, /givecar.");
}
if (PlayerData[playerid][pAdmin] >= 5) {
SendClientMessage(playerid, COLOR_NICELBLUE, "/dynamichelp, /givecash, /clearinventory, /clearwarns, /saveall, /restart.");
}
if (PlayerData[playerid][pAdmin] >= 6) {
SendClientMessage(playerid, COLOR_NICEBLUE, "/makeadmin, /deleteaccount, /deletechar, /factionmod, /panel.");
}
}
else
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Help List : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "TIP: /help [name]");
SendClientMessage(playerid, COLOR_NICEBLUE, "Names: General, Account, Vehicle, Business, House , Property, Helper, Admin");
}
return 1;
}
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Help List : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "TIP: /help [name]");
SendClientMessage(playerid, COLOR_NICEBLUE, "Names: General, Account, Vehicle, Business, House ,
I'd suggest you to use sscanf.
http://pastebin.com/7fBrCa4H You will need to use sscanf include for that. It has not been tested ^. |
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
CMD:help(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /help (category).");
if(!strcmp(params, "general", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : General commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/stats, /report, /helpme, /acc, /me, /do, /(s)hout, /(o)oc, /inventory, /switch.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/approve, /faq, /sell, /paint, /drink, /bank, /cook, /vest, /ammo, /usekit, /phone.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/id, /call, /hangup, /text, /drop, /flist, /crates, /fill, /pay, /gps, /open, /usedrug.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/animcmds, /backpack, /boombox, /channel, /jobcmds, /supporters, /disablecp, /stopanim.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/shakehand, /showlicense, /frisk, /toghud, /passwep, /setradio, /picklock, /resetvw. /factionhelp.");
}
else if(!strcmp(params, "account", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Account Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/changepass, /lastlogged, /username, /properties.");
}
else if(!strcmp(params, "vehicle", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Vehicle Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/park, /lock, /abandon, /refuel, /unmod, /trunk, /listcars, /engine, /lights, /hood, /tow.");
}
else if(!strcmp(params, "business", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Business Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/buy, /abandon, /lock, /vault, /products, /binfo, /bname, /bmessage, /bshipment.");
}
else if(!strcmp(params, "house", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : House Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/buy, /abandon, /lock, /storage, /furniture, /buyrack, /gunrack, /deleterack.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/doorbell, /switch.");
}
else if(!strcmp(params, "property", true))
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Property Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/buy, /abandon, /lock, /housecmds, /products, /vault, /binfo, /bizcmds.");
}
else if(!strcmp(params, "Helper", true))
{
if(!PlayerData[playerid][pTester]) return SendClientMessage(playerid, COLOR_NICEBLUE, "SERVER: You cannot use this command");
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Helper Commands : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "/t, /tduty, /ah, /dh, /kick");
}
else if (!strcmp(params, "admin", true))
{
if(!PlayerData[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_NICEBLUE, "SERVER: You cannot use this command");
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Administrator Commands : : .");
if(PlayerData[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_NICEBLUE, "/a, /reports, /spectate, /ajail, /release, /kick, /mute, /unmute, /freeze, /unfreeze.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/aduty, /ban, /skin /goto /aremovecall");
}
if(PlayerData[playerid][pAdmin] >= 2)
{
SendClientMessage(playerid, COLOR_NICEBLUE, "/respawn, /warn, /checkstats, /shooter, /goto, /bring, /setinterior, /setvw.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/sendto, /clearchat, /spawn, /refill, /revive, /aslap, /acceptname, /declinename, /atalk.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/masked, /listguns, /respawncar, /respawncars, /respawnnear, /heal, /bringcar, /gotocar.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/x /y /z");
}
if(PlayerData[playerid][pAdmin] >= 3)
{
SendClientMessage(playerid, COLOR_NICEBLUE, "/unban, /blacklist, /getip, /togooc, /health, /armor, /resetweps, /arepair, /listwarns.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/entercar, /flipcar, /veh, /destroyveh, /near, /healall, /tracenumber, /bleeding.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/atune, /acolorcar, /apaintjob, /afire, /akillfire, /adestroybox.");
}
if(PlayerData[playerid][pAdmin] >= 4)
{
SendClientMessage(playerid, COLOR_NICEBLUE, "/givewep, /settester, /baninfo, /setname, /asetfaction, /asetrank, /setitem.");
SendClientMessage(playerid, COLOR_NICELBLUE, "/asellhouse, /asellbiz, /jetpack, /setweather, /setfuel, /setcarhp, /spawnitem.");
SendClientMessage(playerid, COLOR_NICEBLUE, "/setquantity, /destroyitem, /setplayer, /setleader, /setinventory, /givecar.");
}
if(PlayerData[playerid][pAdmin] >= 5)
{
SendClientMessage(playerid, COLOR_NICELBLUE, "/dynamichelp, /givecash, /clearinventory, /clearwarns, /saveall, /restart.");
}
if(PlayerData[playerid][pAdmin] >= 6)
{
SendClientMessage(playerid, COLOR_NICEBLUE, "/makeadmin, /deleteaccount, /deletechar, /factionmod, /panel.");
}
}
else
{
SendClientMessage(playerid, COLOR_NICEYELLOW, ". : : Help List : : .");
SendClientMessage(playerid, COLOR_NICEBLUE, "TIP: /help [name]");
SendClientMessage(playerid, COLOR_NICEBLUE, "Names: General, Account, Vehicle, Business, House , Property, Helper, Admin");
}
return 1;
}