SA-MP Forums Archive
command vip help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: command vip help (/showthread.php?tid=403206)



command vip help - Adam_Hardy - 29.12.2012

Код:
CMD:makevip(playerid, params[])
{
	new playerb, viplevel, string[128];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(sscanf(params, "uii", playerb, viplevel)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /makevip [playerid] [level]");
	if(viplevel < 0 || viplevel > 4) return SendClientMessage(playerid, COLOR_GREY, "VIP levels are between 1 and 4.");
	if(viplevel > 0 || viplevel < 4)
    {
    PlayerInfo[playerid][pVIP] = 1;
    }                                     // Line 14222
	else(viplevel == 0)          // Line 14223
	{
		format(string, sizeof(string), "AdmWarn: %s has removed %s's VIP package.", RPN(playerid), RPN(playerb));
		SendAdminMessage(COLOR_DARKRED, 1, string);
		Log("logs/makevip.log", string);
		format(string, sizeof(string), " Adminisistrator %s has removed your VIP package.", RPN(playerid));
		SendClientMessage(playerb, COLOR_VIP, string);
		return 1;
	}
}
(14222 -- 14223) : error 029: invalid expression, assumed zero


Re: command vip help - bensmart469 - 29.12.2012

if(viplevel > 0 || viplevel < 4)
I dont think there is any point in having this