Help command
#7

Code:
if(strcmp(cmd, "/makeadmin", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{D580FE}Foloseste:{FFFFFF} /makeadmin [playerid/PartOfName] [level(1-1338)]");
				return 1;
			}
			/*if(AdminSecurity[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "Pentru securitate, indetifica-te in /account panel!");
                return 1;
            }*/
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] == 1338)
			{
			    if(IsPlayerConnected(para1))
			    {
				if(IsPlayerAdmin(para1))
        			{
        			    SendClientMessage(playerid, COLOR_GRAD2, "Adminul acesta este logat ca admin principal !");
        			    return 1;
					}
			        if(para1 != INVALID_PLAYER_ID)
			        {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pAdmin] = level;
						printf("SERVER: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
						format(string, sizeof(string), "   You have been promoted to a level %d admin by %s", level, sendername);
						SendClientMessage(para1, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "   You have promoted %s to a level %d admin.", giveplayer,level);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Nu ai dreptul de a utiliza aceasta comanda!");
			}
		}
		return 1;
	}
Acum poate da admin numai admin level 1338 sau rcon
Reply


Messages In This Thread
Help command - by Rapk1d - 30.09.2012, 11:21
Re: Help command - by IuLyAnBoSs - 30.09.2012, 13:10
Re: Help command - by Rapk1d - 30.09.2012, 13:30
Re: Help command - by IuLyAnBoSs - 30.09.2012, 13:59
Re: Help command - by RaZVaN ^ xD - 30.09.2012, 14:42
Re: Help command - by doryn3l - 30.09.2012, 16:55
Re: Help command - by Flashhiee - 30.09.2012, 17:11
Re: Help command - by RaZVaN ^ xD - 30.09.2012, 17:54
Re: Help command - by SumX - 30.09.2012, 19:22
Re: Help command - by Flashhiee - 01.10.2012, 09:16

Forum Jump:


Users browsing this thread: 2 Guest(s)