elite player
#3

Try this:

Код:
CMD:ep(playerid, params[])
{
    new lookupid, str[128];
    if(pData[playerid][Admin] >= 4 || IsPlayerAdmin(playerid))
    {
        if(sscanf(params,"u",lookupid)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /tp (UserID | UserName)");
        if(pData[lookupid][Admin] > pData[playerid][Admin]) return SendClientMessage(playerid, -1, "Sorry you cant setlevel becoz his level is higher then you");
        if(!IsPlayerConnected(lookupid)) return SendClientMessage(playerid,0xFF0000FF, "Sorry this player isnt connected ");

		switch(pData[lookupid][Admin])
		{
		    case 1:
		    {
	            format(str, sizeof(str), "Admin %s (ID:%d) has gived you EP statue",GetName(playerid), playerid);
	            SendClientMessage(lookupid, COLOR_YELLOW, str);
	            format(str, sizeof(str),"You have gived %s (ID:%d) EP Statue",GetName(lookupid),lookupid);
	            SendClientMessage(playerid, COLOR_YELLOW, str);
	            pData[lookupid][Admin] = 2;
		    }
		    case 2:
		    {
	            format(str, sizeof(str), "Admin %s (ID:%d) has removed your EP statue",GetName(playerid), playerid);
	            SendClientMessage(lookupid, 0xFF0000FF, str);
	            format(str, sizeof(str),"You have Removed %s (ID:%d) EP statue",GetName(lookupid),lookupid);
	            SendClientMessage(playerid, 0xFF0000FF, str);
	            pData[lookupid][Admin] = 0;
		    }
		}
    }
    else return SendClientMessage(playerid, COLOR_YELLOW, "Only +level 4 can use this command");
}
EDIT: Too slow I guess :P
Reply


Messages In This Thread
elite player - by Loinal - 09.02.2017, 18:56
Re: elite player - by silverms - 09.02.2017, 19:24
Re: elite player - by Macronix - 09.02.2017, 19:25
Re: elite player - by Dayrion - 09.02.2017, 21:53
Re: elite player - by Loinal - 09.02.2017, 22:12
Re: elite player - by silverms - 10.02.2017, 04:36

Forum Jump:


Users browsing this thread: 1 Guest(s)