Help me with a cmd
#5

But i need help...
My code, i want to add another "section", i don't know what is called, but in this command, is used /daradmin id level, i want /daradmin id level string, someone help me on how to do this
Код:
    if(strcmp(cmd, "/daradmin", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [ id ] [level(1-10)]");
				SendClientMessage(playerid, COLOR_GRAD2, "Nives de Admins");
				SendClientMessage(playerid, COLOR_GRAD2, "1 = Moderador");
				SendClientMessage(playerid, COLOR_GRAD2, "2 = Admin");
				SendClientMessage(playerid, COLOR_GRAD2, "3 = Admin");
    			SendClientMessage(playerid, COLOR_GRAD2, "4 = Admin");
        		SendClientMessage(playerid, COLOR_GRAD2, "5 = Master");
                SendClientMessage(playerid, COLOR_GRAD2, "6 = SuperMaster");
                SendClientMessage(playerid, COLOR_GRAD2, "7 = SubDono");
        		SendClientMessage(playerid, COLOR_GRAD2, "10 = Dono");
                return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(PlayerInfo[playerid][pAdmin] >= 10 || IsPlayerAdmin(playerid))
            {
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
                        if(PlayerInfo[playerid][pAdmin] >= 10){
						format(string, sizeof(string), "   Vocк foi promovido para level  %d de Admin - Por %s", level, Nome(playerid));
						SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Admin[%s] Promovido a Level [%d] de Admin.", Nome(para1), level, giveplayer);
                        MensagemAdmin(COLOR_GRAD1,string,1);
                        }
						PlayerInfo[para1][pAdmin] = level;
						printf(":Admin: - %s foi promovido por %s a level %d de admin", Nome(para1), Nome(playerid), level);
						format(string, sizeof(string), "   Vocк promoveu %s Para o level %d de Admin.", Nome(para1), level);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Help me with a cmd - by ImVictor - 04.11.2016, 00:07
Re: Help me with a cmd - by sammp - 04.11.2016, 00:27
Re: Help me with a cmd - by ImVictor - 04.11.2016, 00:29
Re: Help me with a cmd - by SickAttack - 04.11.2016, 00:32
Re: Help me with a cmd - by ImVictor - 04.11.2016, 00:44

Forum Jump:


Users browsing this thread: 1 Guest(s)