LuxAdmin Problem(VIP system)
#1

Hi , i have 2 problems in VIP SYSTEM this is the full VIP Script:
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <ladmin>
#include <colors>

#define COLOR_LIGHTRED 0xFB0000AA
#define COLOR_SKYBLUE 0x87CEEBFF
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x9EC73DAA
#define COLOR_GROVE 0x00FF00FF
#define COLOR_RED 0xAA3333AA
#define COLOR_COOLRED 0xB35959AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_GRAYWHITE 0xEEEEFFC4
#define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
#define COLOR_GREENISHGOLD 0xCCFFDD56
#define COLOR_NEUTRALBLUE 0xABCDEF01
#define COLOR_LEMON 0xDDDD2357
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_YELLOW 0xDABB3EAA
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_CHAT1 0xF9B7FFAA
#define COLOR_CHAT2 0xE6A9ECAA
#define COLOR_CHAT3 0xC38EC7AA
#define COLOR_CHAT4 0xD2B9D3AA
#define COLOR_CHAT5 0xC6AEC7AA
#define COLOR_ALLDEPT 0xFF8282AA
#define COLOR_NEWS 0x458E1DAA
#define COLOR_OOC 0xE0FFFFAA
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];

///////////////////////SILVER CMDS VIP///////heal///////////////////////
	if(strcmp(cmd, "/healme", true) == 0)
{
if(IsPlayerVipMember(playerid,0))
{
SetPlayerHealth(playerid, 100);
}
else SendClientMessage(playerid,COLOR_LIGHTRED, "ERROR: You Must Be Silver/Gold/Premium VIP to us this Command !");
return 1;
}
////////////////////GOLD VIP//////////////////MINIGUN////////////////////////////////
if(strcmp(cmd, "/minigun", true) == 0)
{
if(IsPlayerVipMember(playerid,2))
{
GivePlayerWeapon(playerid, 38,250);
}
else SendClientMessage(playerid,COLOR_LIGHTRED, "ERROR: You are not a GOLD V.I.P!");
return 1;
}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
there are 6 warnings... the problem whene i Go IG and Use /minigun it don't give me it ...

and whene i'm not VIP and use /minigun Normally it must says : ERROR: You are not a GOLD V.I.P!
because i defineed this command only for Gold (2)
but it say the first Message :ERROR: You Must Be Silver/Gold/Premium VIP to us this Command !

so i have Two problems... i need Help
Reply
#2

You can try this under OnPlayerCommandText:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

//======SILVER CMDS VIP======Heal==============
	
	if(!strcmp(cmdtext,"/healme",true,7))
	{
		if(IsPlayerVipMember(playerid,0))        // Make sure you get these right
		{
			SetPlayerHealth(playerid, 100);
			return 1;
		}
		SendClientMessage(playerid,COLOR_LIGHTRED, "ERROR: You Must Be Silver/Gold/Premium VIP to use this Command !");
	}

//======GOLD VIP============MINIGUN============

	if(!strcmp(cmdtext,"/minigun",true,8))
	{
		if(IsPlayerVipMember(playerid,2))
		{
			GivePlayerWeapon(playerid, 38,250);
			return 1;
		}
		SendClientMessage(playerid,COLOR_LIGHTRED, "ERROR: You are not a GOLD V.I.P!");
	}
	return 0;
}
Getting two error messages indicates a misplaced else or return. Let me know if it works.
Reply
#3

There are a problem ....
Код:
	if(!strcmp(cmdtext,"/minigun",true,8))
	{
		if(IsPlayerVipMember(playerid,2))
		{
			GivePlayerWeapon(playerid, 38,250);
			return 1;
		}
		SendClientMessage(playerid,COLOR_COOLRED, "ERROR: You are not a GOLD V.I.P!");
	}
	return 0;
}
whene i'm Silver VIP i can use /minigun also if i have defined this command to (2=Gold as sayed the creator of LuxAdmin)

i want this command only for Gold VIP...
Reply
#4

Guys Can U help me please? I am Using LuxAdmin System and I Want Vip Cmds Ex: Ur Vip U type /vcmds And It comes For u lots VIP CMDS! like /vbike /vcar /vjet! Please Help me! Thank U!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)