I need help... [Just a Very Simple & small thing]
#1

Look i want to make a Simple help command and i know how to make it dont think i am a N00B. But i need a Thing.

Code:
if(strcmp(cmdtext,"/help", true) == 0)
{
SendClientMessage(playerid, COLOR,"Welcome to my Server Help - Usage: /Help [Section]");
SendClientMessage(playerid, COLOR,"Sections: General, Chats, Faction...");
return 1;
}
I dont want to do this thing
Code:
if(strcmp(cmdtext,"/help General", true) == 0)
{
SendClientMessage(playerid, COLOR,"Something here");
return 1;
}
I want something else so i can make and If some player is in Faction so he/she can use /help faction, donator etc...

Help me plz
Reply
#2

so you want somthing like
/help general
/help faction
/help donator
ect.
??
Reply
#3

Code:
	if(strcmp(cmd, "/help", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	                      SendClientMessage(playerid, COLOR_GRAD1,":: ACCOUNT :: /rules /stats /account /rules /information");
			SendClientMessage(playerid, COLOR_GRAD1,":: GENERAL :: /pay /charity /time /buy /switchkey /id /drink /clothes /restartspawn");
			SendClientMessage(playerid, COLOR_GRAD2,":: GENERAL :: /resetupgrades(50k) /buygun /lock /licenses /showlicenses(/sl) /report /asay /animlist /stopanim /fuel /use");
			SendClientMessage(playerid, COLOR_GRAD2,":: GENERAL :: /report /cancel /accept /eject /usedrugs /contract /fill /admins /gps /chatmode /fightstyle /(de)attachweapon");
			SendClientMessage(playerid, COLOR_GRAD3,":: GENERAL :: /windows /coin /trunk (/inv)entory /knock /knockout /give /open /sid /smoke /(sur)render /cophelp /selectspawn");
	  		SendClientMessage(playerid, COLOR_GRAD3,":: CHAT :: (/o)oc /me /(ad)vertise (/carw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone");
			SendClientMessage(playerid, COLOR_GRAD4,":: BANK :: /balance /withdraw /deposit /atm");
   			if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
			{
   				SendClientMessage(playerid, COLOR_YELLOW2, ":: LCN :: (/r)adio /news /papers");
   			}
                          if(PlayerInfo[playerid][pJob] == 1) {
		    SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Detective:: /find"); }
		    else if(PlayerInfo[playerid][pJob] == 2) {
		    SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Lawyer :: /free"); }
		    else if(PlayerInfo[playerid][pJob] == 3) {
		    SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Taxi company :: /tduty /jopen"); }

			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				SendClientMessage(playerid, COLOR_YELLOW, ":: ADMIN :: /admin or // (/ah)elp");
			}
			SendClientMessage(playerid, COLOR_GRAD6,":: OTHER :: /cellphonehelp /househelp /notehelp /vehiclehelp /renthelp /businesshelp /leaderhelp /fishhelp /cookhelp /irchelp /derbyhelp");
		}
		return 1;
	}
add more list of commands....
Reply
#4

Yeah like that.
Reply
#5

Quote:
Originally Posted by mastalol
View Post
so you want somthing like
/help general
/help faction
/help donator
ect.
??
Yeah like that
Reply
#6

Quote:
Originally Posted by Harry_Sandhu
View Post
Yeah like that.
Code:
if(strcmp(cmd, "/help", true) == 0) // by Cuervo
	{
		if(IsPlayerConnected(playerid))
		{
			new x_nr[24];
			x_nr = strtok(cmdtext, idx);
			if(!strlen(x_nr))
			{
			    SendClientMessage(playerid, COLOR_GREY, "COMANDS: commands.. [");
			    SendClientMessage(playerid, COLOR_GREY, "COMANDS: /help admin /help gm /help leader");
				return 1;
			}
			if(strcmp(x_nr,"admin",true) == 0)
			{
   				SendClientMessage(playerid, COLOR_GREY, "COMANDS: commands");

			}
			else if(strcmp(x_nr,"gm",true) == 0)
			{
   				SendClientMessage(playerid, COLOR_GREY, "COMANDS: commands");
			}
			else if(strcmp(x_nr,"leader",true) == 0)
			{
                                     SendClientMessage(playerid, COLOR_GREY, "COMANDS: commands");
                                  }
			else return SendClientMessage(playerid, COLOR_GREY,"* Unknown help!");
		}
		return 1;
	}
I hope I help
Reply
#7

Thank you very much and I want a Command that If a Person is in Faction then he will be able to use the command
/help faction otherwise the message is You are not in a Faction
Reply
#8

Dude its not Working in Game
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)