I need help with Commands
#1

Hi guys, i need help with commands, i want to create a "/makevip","/makeadmin",and"/neon" Commands the makevip and makeadmin command only work for level 10 admins and the neon command only work for level 3 vips and admins. i'm using this GAMEMODE Thanks all!
Reply
#2

show me the codes of that commands.....
Reply
#3

If you want us to code it for you then this is the wrong section mate.
Reply
#4

Here's the example of that commands
Код:
CMD:setvip(playerid, params[])
{
    new level, aname[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][AdminLevel] != 10) return SendClientMessage(playerid, COLOR_RED, "You must be a RCON Admin to use this command!");
    new targetid;
    if(sscanf(params, "ui", targetid, level)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /setvip [PlayerID][Level]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "That player is not connected to the server");
    if(level < 0 || level > 4) return SendClientMessage(playerid, COLOR_RED, "VIP Level Range Is From 0 To 3");
	if(targetid != INVALID_PLAYER_ID)
	{
		new string1[90], tname[MAX_PLAYER_NAME], string2[90], file[300];
	    PlayerInfo[targetid][VipLevel] = level;
	   	GetPlayerName(targetid, tname, sizeof(tname));
		format(file,sizeof(file),"nAdmin/Users/%s.ini",tname);
	    dini_IntSet(file,"VipLevel",level);
	    GetPlayerName(playerid, aname, sizeof(aname));
	    format(string1, sizeof(string1), "Admin %s has set your VIP level to %i", aname, level);
	    SendClientMessage(targetid, COLOR_GREEN, string1);
	    GameTextForPlayer(targetid, "Congratulations!", 2000, 5);
	    format(string2, sizeof(string1), "{00FF00}Admin %s has set %s's VIP level to %i", aname, tname, level);
	    SendClientMessageToAll(COLOR_YELLOW, string2);
	    SendCommandToAdmins(playerid,"/setvip");
	    format(string1, sizeof(string1), "%s has set %s's VIP Level to %d", aname, tname, level);
		SaveIn("SetVipLog",string1);
	}
	else return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid");
    return 1;
}
Reply
#5

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
If you want us to code it for you then this is the wrong section mate.
Oh sorry, what's the right section? I'm a newbie XD
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=447813 here.
Reply
#7

Aight thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)