VIP Script Problem [HELP]
#1

I'm sorry but I'll give you the link to the tutorial on how to create a VIP System. I posted the errors I had at the last page of the tutorial. I posted it here because there might be player's looking in scripting discussions willing to help players.
Here is the link: https://sampforum.blast.hk/showthread.php?tid=314776
Reply
#2

Quote:
Originally Posted by RTR12
Посмотреть сообщение
I'm sorry but I'll give you the link to the tutorial on how to create a VIP System. I posted the errors I had at the last page of the tutorial. I posted it here because there might be player's looking in scripting discussions willing to help players.
Here is the link: https://sampforum.blast.hk/showthread.php?tid=314776
Post the line that is giving out the errors...
Reply
#3

I followed the tutorial, but got 2 errors.
Here they are:
Код:
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : error 017: undefined symbol "makevip"
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(99) : error 017: undefined symbol "sscanf2"
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : warning 203: symbol is never used: "CMD"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
How to fix?
In the tutorial, its sscanf. I downloaded a latest stable version of sscanf, and the name is sscanf2.inc. So it should be sscanf2. I also did #define <zcmd> and #define <sscanf2> under #if defined FILTERSCRIPT.
About the setvip, I made it makevip. I tried both "setvip/makevip", same error. Please help.
Reply
#4

After I put the two #include's, I have 4 errors now. I give you the code.
Here it is:
Код:
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : error 029: invalid expression, assumed zero
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : error 017: undefined symbol "cmd_makevip"
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : error 029: invalid expression, assumed zero
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
How to fix again? Its better If I gave you line 96:
Код:
CMD:makevip(playerid, params[])
Reply
#5

This is my /setvip command



Код:
CMD:setvip(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 1338 || PlayerInfo[playerid][pShopTech] >= 1)
	{
		new string[128], giveplayerid, level;
		if(sscanf(params, "ud", giveplayerid, level))
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setvip [playerid] [level]");
			SendClientMessageEx(playerid, COLOR_GRAD3, "Available Levels: |0| None |1| Bronze |2| Silver |3| Gold |4| Platinum |5| Moderator");
			return 1;
		}

		if(IsPlayerConnected(giveplayerid))
		{
			if(giveplayerid != INVALID_PLAYER_ID)
			{
				if(level < 0 || level > 5)
				{
					SendClientMessageEx(playerid, COLOR_GRAD1, "VIP Level can not be below 0 or above 5!");
					return 1;
				}
				PlayerInfo[giveplayerid][pDonateRank] = level;
				PlayerInfo[giveplayerid][pTempVIP] = 0;
				PlayerInfo[giveplayerid][pBuddyInvited] = 0;
				new year, month,day;
				getdate(year, month, day);
				new playerip[32];
				GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
				if(level == 0)
				{
					if (PlayerInfo[playerid][pAdmin] < 1337)
					{
						format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to None (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
						SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
					}
					format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to None (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
					ABroadCast(COLOR_LIGHTRED,string, 1337);
					format(string, sizeof(string), "Your VIP level has been set to None by Admin %s.", GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
					PlayerInfo[giveplayerid][pTokens] = 0;

					format(string, sizeof(string), "AdmCmd: %s has set %s's (IP:%s) VIP level to None (%d). (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), playerip, level, month,day,year);
					Log("logs/setvip.log", string);
					return 1;
				}
				if(level == 1)
				{
					if (PlayerInfo[playerid][pAdmin] < 1337)
					{
						format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Bronze (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
						SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
					}
					format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Bronze (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
					ABroadCast(COLOR_LIGHTRED,string, 1337);
					format(string, sizeof(string), "Your VIP level has been set to Bronze by Admin %s.", GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_WHITE, string);

					format(string, sizeof(string), "AdmCmd: %s has set %s's (IP:%s) VIP level to Bronze (%d). (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), playerip, level, month,day,year);
					Log("logs/setvip.log", string);
					return 1;
				}
				if(level == 2)
				{
					if (PlayerInfo[playerid][pAdmin] < 1337)
					{
						format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Silver (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
						SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
					}
					format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Silver (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
					ABroadCast(COLOR_LIGHTRED,string, 1337);
					format(string, sizeof(string), "Your VIP level has been set to Silver by Admin %s.", GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_WHITE, string);

					format(string, sizeof(string), "AdmCmd: %s has set %s's (IP:%s) VIP level to Silver (%d). (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), playerip, level, month,day,year);
					Log("logs/setvip.log", string);
					return 1;
				}
				if(level == 3)
				{
					if (PlayerInfo[playerid][pAdmin] < 1337)
					{
						format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Gold (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
						SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
					}
					format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Gold (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
					ABroadCast(COLOR_LIGHTRED,string, 1337);
					format(string, sizeof(string), "Your VIP level has been set to Gold by Admin %s.", GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_WHITE, string);

					format(string, sizeof(string), "AdmCmd: %s has set %s's (IP:%s) VIP level to Gold (%d). (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), playerip, level, month,day,year);
					Log("logs/setvip.log", string);
					return 1;
				}
				if(level == 4)
				{
					if (PlayerInfo[playerid][pAdmin] < 1337)
					{
						format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Platinum (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
						SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
					}
					format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Platinum (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
					ABroadCast(COLOR_LIGHTRED,string, 1337);
					format(string, sizeof(string), "Your VIP level has been set to Platinum by Admin %s.", GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_WHITE, string);

					// Level 5 Arms Job - Platinum VIP
					PlayerInfo[giveplayerid][pArmsSkill] = 401;

					format(string, sizeof(string), "AdmCmd: %s has set %s's (IP:%s) VIP level to Platinum (%d). (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), playerip, level, month,day,year);
					Log("logs/setvip.log", string);
					return 1;
				}
				if(level == 5)
				{
					if (PlayerInfo[playerid][pAdmin] < 1337)
					{
						format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Moderator (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
						SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
					}
					format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Moderator (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
					ABroadCast(COLOR_LIGHTRED,string, 1337);
					format(string, sizeof(string), "Your VIP level has been set to Moderator by Admin %s.", GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_WHITE, string);

					format(string, sizeof(string), "AdmCmd: %s has set %s's (IP:%s) VIP level to Moderator (%d). (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), playerip, level, month,day,year);
					Log("logs/setvip.log", string);
					return 1;
				}
			}
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}
Reply
#6

Quote:
Originally Posted by RTR12
Посмотреть сообщение
After I put the two #include's, I have 4 errors now. I give you the code.
Here it is:
Код:
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : error 029: invalid expression, assumed zero
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : error 017: undefined symbol "cmd_makevip"
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : error 029: invalid expression, assumed zero
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(96) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
How to fix again? Its better If I gave you line 96:
Код:
CMD:makevip(playerid, params[])
Just like Cosmo said you need to
Код:
#include <sscanf2> //big capital letter if .inc name is SSCANF2
#include <zcmd> //big capital letter if .inc name is ZCMD
Reply
#7

Yes I made sure. Both are small capitals. I'll give the whole code now:
Код:
// VIP Script
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>

enum pData
{
    vip
};
new PlayerData[MAX_PLAYERS][pData];
new vlevel,Nam[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],str[128],ID;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" LS-DM V.I.P System - scripted by Sting");
	print(" 100% Loaded!                          ");
	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)
{
	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[])
{
    CMD:makevip(playerid, params[])
    {
        if(!IsPlayerAdmin(playerid)) return 0;//This will make the command work for rcon, if your not rcon it will do SERVER: Unknown Command
        if(sscanf(params,"ui",ID,vlevel)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /makevip [playerid / partofname] [Level 1-3]");//If you do not use the format /setvip properly it will show how to
        if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,0xFF0000FF, "That user is not connected.");//if its an unknown ID, it will show that person is not connected
        if(vlevel > 3) return SendClientMessage(playerid,0xFF0000FF,"AVAILABLE VIP LEVELS 1-3!"); //If you add a number over 3 for /setvip, ex: /setvip Tanush 1000, it will show that message
        if(vlevel == 0)//if you select vip level 0
        {
            if(PlayerData[ID][vip] == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 0 vip!");// If the person you attempt to /setvip that is already level 0 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//Defines the playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//Defines the other player name
            format(str, sizeof(str),"%s has set your VIP Level to 0!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);//It will send the other person a message that %s has set your vip level to 0
            format(str,sizeof(str),"You had set %s VIP Level to 0!",pname);//string
            SendClientMessage(playerid,0xFF9900AA,str);//This will send you that you had set %s vip level to 0
            PlayerData[ID][vip] = 0;//Sets the other person vip level to 0
        }
        if(vlevel == 1)//if you select vip level 1
        {
            if(PlayerData[ID][vip] == 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 1 vip!");//If the person you attempt to /setvip that is already level 1 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines the playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines the other player name
            format(str, sizeof(str),"%s has set your VIP Level to 1 (BRONZE VIP)!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);//Sends the other person a message
            format(str, sizeof(str),"You had set %s VIP Level to 1 (BRONZE VIP)!",pname);//string
            SendClientMessage(playerid,0xFF9900AA,str);//Sends you a message
            PlayerData[ID][vip] = 1;//Sets the other person vip level to 1
        }
        if(vlevel == 2)//if you select vip level 2
        {
            if(PlayerData[ID][vip] == 2) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 2 vip!");//If the person you attempt to /setvip that is already level 2 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines other person name
            format(str, sizeof(str),"%s has set your VIP Level to 2 (SILVER VIP)!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);// Sends the other person a message
            format(str, sizeof(str),"You had set %s VIP Level to 2 (SILVER VIP)!",pname);//string
            SendClientMessage(playerid,0xFF9900AA,str);//sends you a message
            PlayerData[ID][vip] = 2;//sets the other person vip level to 2
        }
        if(vlevel == 3)// if you select vip level 3
        {
            if(PlayerData[ID][vip] == 3) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 3 vip!");//if the person you attempt to /setvip that is already level 3 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines the other person name
            format(str, sizeof(str),"%s has set your VIP Level to 3 (GOLD VIP)!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);//sends the other person a message
            format(str, sizeof(str),"You had set %s VIP Level to 3 (GOLD VIP)!",pname);//String
            SendClientMessage(playerid,0xFF9900AA,str);//Sends you a message
            PlayerData[ID][vip] = 3;//sets the other person vip level to 3
        }
	}
    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;
}
I opened pawn and clicked the new script. So this will be the whole code.
Reply
#8

Still I have a error. I give you the whole code again:
Код:
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>

enum pData
{
    vip
};
new PlayerData[MAX_PLAYERS][pData];
new vlevel,Nam[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],str[128],ID;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" LS-DM V.I.P System - scripted by Sting");
	print(" 100% Loaded!                          ");
	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)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

CMD:makevip(playerid, params[])
    {
        if(!IsPlayerAdmin(playerid)) return 0;//This will make the command work for rcon, if your not rcon it will do SERVER: Unknown Command
        if(sscanf(params,"ui",ID,vlevel)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /makevip [playerid / partofname] [Level 1-3]");//If you do not use the format /setvip properly it will show how to
        if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,0xFF0000FF, "That user is not connected.");//if its an unknown ID, it will show that person is not connected
        if(vlevel > 3) return SendClientMessage(playerid,0xFF0000FF,"AVAILABLE VIP LEVELS 1-3!"); //If you add a number over 3 for /setvip, ex: /setvip Tanush 1000, it will show that message
        if(vlevel == 0)//if you select vip level 0
        {
            if(PlayerData[ID][vip] == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 0 vip!");// If the person you attempt to /setvip that is already level 0 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//Defines the playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//Defines the other player name
            format(str, sizeof(str),"%s has set your VIP Level to 0!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);//It will send the other person a message that %s has set your vip level to 0
            format(str,sizeof(str),"You had set %s VIP Level to 0!",pname);//string
            SendClientMessage(playerid,0xFF9900AA,str);//This will send you that you had set %s vip level to 0
            PlayerData[ID][vip] = 0;//Sets the other person vip level to 0
        }
        if(vlevel == 1)//if you select vip level 1
        {
            if(PlayerData[ID][vip] == 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 1 vip!");//If the person you attempt to /setvip that is already level 1 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines the playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines the other player name
            format(str, sizeof(str),"%s has set your VIP Level to 1 (BRONZE VIP)!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);//Sends the other person a message
            format(str, sizeof(str),"You had set %s VIP Level to 1 (BRONZE VIP)!",pname);//string
            SendClientMessage(playerid,0xFF9900AA,str);//Sends you a message
            PlayerData[ID][vip] = 1;//Sets the other person vip level to 1
        }
        if(vlevel == 2)//if you select vip level 2
        {
            if(PlayerData[ID][vip] == 2) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 2 vip!");//If the person you attempt to /setvip that is already level 2 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines other person name
            format(str, sizeof(str),"%s has set your VIP Level to 2 (SILVER VIP)!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);// Sends the other person a message
            format(str, sizeof(str),"You had set %s VIP Level to 2 (SILVER VIP)!",pname);//string
            SendClientMessage(playerid,0xFF9900AA,str);//sends you a message
            PlayerData[ID][vip] = 2;//sets the other person vip level to 2
        }
        if(vlevel == 3)// if you select vip level 3
        {
            if(PlayerData[ID][vip] == 3) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 3 vip!");//if the person you attempt to /setvip that is already level 3 vip, it will show that
            GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines playerid name
            GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines the other person name
            format(str, sizeof(str),"%s has set your VIP Level to 3 (GOLD VIP)!",Nam);//string
            SendClientMessage(ID,0xFF9900AA,str);//sends the other person a message
            format(str, sizeof(str),"You had set %s VIP Level to 3 (GOLD VIP)!",pname);//String
            SendClientMessage(playerid,0xFF9900AA,str);//Sends you a message
            PlayerData[ID][vip] = 3;//sets the other person vip level to 3
        }
	}
    return 0;
    }
Here is the error:
Код:
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(114) : warning 209: function "cmd_makevip" should return a value
C:\Program Files\GtaSan\Rockstar Games\GTA San Andreas\Server 0.3d\filterscripts\VIP.pwn(115) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#9

Thanks Cosmo!
Reply
#10

Hey man, I tried it and it worked. REP+ to each guy that helped me for this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)