Great VIP system thanks for the help
#1

Good evening have all those who are part of this community because I came here to bother them a little. I would like to order a VIP system which I want a long time ago but due to my knowledge I have not been able to do it and that is why I came here to ask for help. Well I will go straight to the point, the system consists of the following I want a VIP system which is for days what I want is the following: I would like the / Setvip command to have the following parameters example: / Setvip [Level] [Level] Days] [Hours] [Minutes]. I leave a picture and the code to help me do it.



Код:
dcmd_setvip(playerid,params[])
{
	if(PlayerInfo[playerid][LoggedIn] == 1)
	{
	new pame[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pame, sizeof(pame));
 if(!strcmp(NickAutorizado1,pame,true) ||!strcmp(NickAutorizado2,pame,true) ||!strcmp(NickAutorizado3,pame,true))
	{
		if(PlayerInfo[playerid][Level] >= 8 || IsPlayerAdmin(playerid))
		{
		    new tmp [256];
			new Index;
			tmp  = strtok(params,Index);
			tmp2 = strtok(params,Index);
		    if(!strlen(params)) return
   			SendClientMessage(playerid, LIGHTBLUE2, "Usage: /Setvip [Playerid] [Account type]") &&
			SendClientMessage(playerid, orange, "Function: Specify the Account Type (0-NormalAcc,1-Silver,2-Gold,3-Premium,4-Platinum,5-Mortal,6-FullMortal)");

	    	new player1, type, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
			player1 = strval(tmp);
			if(!strlen(tmp2)) return
			SendClientMessage(playerid, LIGHTBLUE2, "Usage: /Setvip [Playerid] [Account type]") &&
			SendClientMessage(playerid, orange, "Function: Specify the Account Type (1-Silver,2-Gold,3-Premium,4-Platinum,5-Mortal,6-FullMortal)");
			type = strval(tmp2);

			if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
			{
				if(PlayerInfo[player1][LoggedIn] == 1)
				{
				if(type > 6)
				return SendClientMessage(playerid,red,"ERROR: Invalid Account Type!");
				if(type == PlayerInfo[player1][pVip])
				return SendClientMessage(playerid,red,"ERROR: This Player Already Has This Account Type!");
	       		CMDMessageToAdmins(playerid,"SetVip");
				GetPlayerName(player1, playername, sizeof(playername));
				GetPlayerName(playerid, adminname, sizeof(adminname));
		       	new year,month,day;
		   		new hour,minute,second;
		  		getdate(year, month, day);
		  		gettime(hour,minute,second);

 				switch(type)
				{
					case 1: AccType = "Silver";
					case 2: AccType = "Gold";
					case 3: AccType = "Premium";
					case 4: AccType = "Platinum";
					case 5: AccType = "Mortal";
					case 6: AccType = "FullMortal";
				}
				if(type > 0)
				format(string2,sizeof(string2),"|- Administrator %s Changed Your Account to: %s",adminname,AccType);
				else
				format(string2,sizeof(string2),"|- Administrator %s Changed Your Account to: 'Normal Account!",adminname);
				SendClientMessage(player1,0x66C178AA,string2);
				if(type > PlayerInfo[player1][pVip])
				GameTextPlayer(player1,"Promoted", 2000, 3);
				else GameTextPlayer(player1,"Demoted", 2000, 3);

				format(string2,sizeof(string2),"You have given %s The Account Type: %s on '%d/%d/%d' at '%d:%d:%d'", playername, AccType, day, month, year, hour, minute, second);
				SendClientMessage(playerid,0x00C378AA,string2);
				format(string2,sizeof(string2),"Administrator %s has been made to %s the Account Type: %s",adminname, playername, AccType);
				SaveToFile("VipLog",string2);
				dUserSetINT(PlayerName2(player1)).("AccountType",(type));
				PlayerInfo[player1][pVip] = type;
				return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
				}
				else return SendClientMessage(playerid,red,"ERROR: This player is not Registred or Logged!");
			}
			else return SendClientMessage(playerid,red,"ERROR: You Do not Have The Enough Level To Use This Command!");
		}
		else return SendClientMessage(playerid,red,"ERROR: Player Not Connected!");
 }
  		else return SendClientMessage(playerid,red,"Only Skrixel, can account VIP");
 }
	else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this command");
}
That would be the code that I want to be in this way with these parameters: / Setvip [ID] [Level] [Days] [Hours] [Minutes], also I want it to come out that when I put: / Listavip is in the image, I would also like that when a user ran out of the VIP, a message saying: Your VIP has expired.

This would be the code of the command / Listavip I want it to come out just like in the image.

Код:
dcmd_listavip(playerid,params[])
{
#pragma unused params
new conteo, vips[7000],texto[128],titulo[128];
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pVip] >= 1)
{
conteo++;
}
}
if(conteo == 0)return SendClientMessage(playerid,red,"No VIP players connected");
format(titulo,128,"{40FF00}|| Vips connected ||: {FFFFFF}>> %d <<",conteo);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pVip] >= 1)
{
//Si el player es VIP
format(texto,128,"{FFFFFF}%s [ID: %d] {00FFFF}[Account: %d] \n",PlayerName2(i),i,PlayerInfo[i][pVip]);
strcat(vips,texto);
}
}
ShowPlayerDialog(playerid,79,DIALOG_STYLE_LIST,titulo,vips,"Close","");
return 1;
}
This would be the other part that I want, is equal to the VIP but in this form:



I want it to be part like the VIP but permanently I leave the code, I explain osea what I want is that when you give admin level to a user this is permanently as it is in the image:

Код:
dcmd_setlevel(playerid,params[]) {
	if(PlayerInfo[playerid][LoggedIn] == 1) {
        new pame[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, pame, sizeof(pame));
		if(!strcmp(NickAutorizado1,pame,true) || !strcmp(NickAutorizado2,pame,true) ||!strcmp(NickAutorizado3,pame,true))
		{
		if(PlayerInfo[playerid][Level] >= 8 ) {
		    new tmp[256],  Index;		tmp = strtok(params,Index), tmp2 = strtok(params,Index);
		    if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /setlevel [playerid] [level]");
	    	new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
			player1 = strval(tmp);
			if(!strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setlevel [playerid] [level]");
			level = strval(tmp2);

			if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
				if(PlayerInfo[player1][LoggedIn] == 1) {
					if(level > ServerInfo[MaxAdminLevel] ) return SendClientMessage(playerid,red,"ERROR: Incorrect Level");
					if(level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,"ERROR: Player is already this level");
	       			CMDMessageToAdmins(playerid,"SETLEVEL");
					GetPlayerName(player1, playername, sizeof(playername));	GetPlayerName(playerid, adminname, sizeof(adminname));
			       	new year,month,day;   getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);

					if(level > 0) format(string2,sizeof(string2),"Administrator %s has set you to Administrator Status [level %d]",adminname, level);
					else format(string2,sizeof(string2),"Administrator %s has set you to Player Status [level %d]",adminname, level);
					SendClientMessage(player1,blue,string2);

					if(level > PlayerInfo[player1][Level]) GameTextPlayer(player1,"Promoted", 2000, 3);
					else GameTextPlayer(player1,"Demoted", 2000, 3);

					format(string2,sizeof(string2),"You have made %s Level %d on %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string2);
					format(string2,sizeof(string2),"Administrator %s has made %s Level %d on %d/%d/%d at %d:%d:%d",adminname, playername, level, day, month, year, hour, minute, second);
					SaveToFile("AdminLog",string2);
					//if(level == PlayerInfo[player1][Level])
					dUserSetINT(PlayerName2(player1)).("level",(level));
					if(level >= 1){dUserSetINT(PlayerName2(player1)).("user",(1));}
					if(level == 0){dUserSetINT(PlayerName2(player1)).("user",(0));}
					PlayerInfo[player1][Level] = level;
					return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
				} else return SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be admin");
			} else return SendClientMessage(playerid, red, "Player Not Connected!");
		} else return SendClientMessage(playerid,red,"ERROR: You Do not Have The Enough Level To Use This Command!");
		} else return SendClientMessage(playerid,red,"ERROR: Only Skrixel gives admin rank");
	} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this command");
}
This would be the command that will show the dialog of the list of connected administrators. I want it to come out as it is right in the image it would appear as it is in the image Nick Range - Level and Time remaining which will be Permanent as it is right in the image.

Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new conteo, admins[1500],texto[128],titulo[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
conteo++;
}
else if(PlayerInfo[i][Level] >= 1)
{
conteo++;
}
}
if(conteo == 0)return SendClientMessage(playerid,red,"No hay Administradores conectados"); //esto para cuando no alla admins , No saldra el menu
format(titulo,128,"{40FF00}|| Admins Online ||: {FFFFFF}>> %d <<",conteo);
//Se contaron los admins conectados
for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerAdmin(i))
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel]: {00FFFF}[ Admin Rcon / Owner ]\n",PlayerName2(i),i);
    strcat(admins,texto);
    }
     else if(PlayerInfo[i][Level] >= 8)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {00FFFF}[ Server owner ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
    else if(PlayerInfo[i][Level] >= 7)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {00FFFF}[ Server manager ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
    else if(PlayerInfo[i][Level] >= 6)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {92FF00}[ Master Administrator ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
        else if(PlayerInfo[i][Level] >= 5)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {FE0000}[ Basic Administrator ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
            else if(PlayerInfo[i][Level] >= 4)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {0079D3}[ Beginner Administrator ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
      else if(PlayerInfo[i][Level] >= 3)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {FFFF00}[ Master Moderator ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
      else if(PlayerInfo[i][Level] >= 2)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {FF7900}[ Basic Moderator ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
      else if(PlayerInfo[i][Level] >= 1)
    {
    format(texto,128,"{FFFFFF}%s [ID: %d] {00FF00}[Nivel: %d] {FF59FF}[ Test Moderator ]\n",PlayerName2(i),i,PlayerInfo[i][Level]);
    strcat(admins,texto);
    }
    }
    ShowPlayerDialog(playerid,78,DIALOG_STYLE_MSGBOX,titulo,admins,"Exit","");
    return 1;
}
And to finish I would like that here would be just like the VIP osea there will be two commands to give admin rank permanently and for days. is that I leave them would be the one that gives you rank of administrator for days and the one of top is to give admin permanently:



Well as you see in the image just like this would be the admin for days and the above would be permanently I leave the code for the days.

Код:
dcmd_settemplevel(playerid,params[]) {
	if(PlayerInfo[playerid][LoggedIn] == 1) {
		new pame[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, pame, sizeof(pame));
    	if(!strcmp(NickAutorizado1,pame,true) ||!strcmp(NickAutorizado2,pame,true) ||!strcmp(NickAutorizado3,pame,true)){

		if(PlayerInfo[playerid][Level] >= 7 || IsPlayerAdmin(playerid)) {
		    new tmp[256],  Index;		tmp = strtok(params,Index), tmp2 = strtok(params,Index);
		    if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /settemplevel [playerid] [level]");
	    	new player1, level;
			player1 = strval(tmp);
			level = strval(tmp2);

			if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
				if(PlayerInfo[player1][LoggedIn] == 1) {
					if(level >= ServerInfo[MaxAdminLevel] ) return SendClientMessage(playerid,red,"ERROR: Incorrect Level");
					if(level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,"ERROR: Player is already this level");
	       			CMDMessageToAdmins(playerid,"SETTEMPLEVEL");
			       	new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);

					if(level > 0) format(string2,sizeof(string2),"Administrator %s has temporarily set you to Administrator Status [level %d]", pName(playerid), level);
					else format(string2,sizeof(string2),"Administrator %s has temporarily set you to Player Status [level %d]", pName(playerid), level);
					SendClientMessage(player1,blue,string2);

					if(level > PlayerInfo[player1][Level]) GameTextPlayer(player1,"Promoted", 2000, 3);
					else GameTextPlayer(player1,"Demoted", 2000, 3);

					format(string2,sizeof(string2),"You have made %s Level %d on %d/%d/%d at %d:%d:%d", pName(player1), level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string2);
					format(string2,sizeof(string2),"Administrator %s has made %s temp Level %d on %d/%d/%d at %d:%d:%d",pName(playerid), pName(player1), level, day, month, year, hour, minute, second);
					SaveToFile("TempAdminLog",string2);
					PlayerInfo[player1][Level] = level;
					return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
				} else return SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be admin");
			} else return SendClientMessage(playerid, red, "Player Not Connected!");
			} else return SendClientMessage(playerid,red,"ERROR: You Do not Have The Enough Level To Use This Command!");
		} else return SendClientMessage(playerid,red,"ERROR: Skrixel only gives temporary admin");
	} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this command");
}
He believed that with this he can do the one of days and with the one of above permamente or with the one of above can do both.

Well I hope you understood my request.

1.- I know that it is a rather large and extensive request, and I know that no one would do so unless he has a great knowledge in this, and it is very easy to do it, so to speak, it would be a walk for him / , I knew I would, but I did not realize it.

2.- They believe that if I knew how to do it myself I would do it

3.- Yes I am here is for something and it is for the simple reason that not to do it

4.- The person who fulfills this request will believe me that I will be grateful to him for the whole life

5.- I know that these types of orders are not often made, but the truth is I want it and I want it

6.- That person who helps me with this I am willing to give you what you ask except money which I do not have although if I had it I would gladly give it to you since I have long wanted this system

7.- Finally if any person comes to help me with such a system I am willing to give it Owner and put it on the list of credits and owners of the server with me is the only thing I can offer you

8.- I am thinking of creating a community and therefore I want this system that person who performs my request will have the same rights as I on the server, since this would be Owner along with me, since that would be my way of paying you. Money I can not offer because I do not have it.

9.- I am willing to form a community together with, that person that helps me to realize this system, is one of my dreams Haha you will say you sarpas but the truth always I have wanted, this system for my server.

10.- Why do not you do it ?, Why the truth if I knew I would do it and I was not here asking the favor.

11.- I know that not many will take the trouble to read everything, but that person who is really interested in helping me will be taken into account to be part of the community that I intend to do.

12.- I know that not everyone will do it and less with nothing in return but what I can offer you is that and I hope they really help me, agradesco for life thank you very much.

I hope that somebody really helps me I will thank him for life, well without more to say I say goodbye and I hope not to be forgotten and this request is ignored, believe me that I will be very grateful for life with that person to help me with this is the only thing I want to thank you very much.
Reply
#2

what in the world
Reply
#3

pls what the fuck are you doing?
why are you still in year 2009 where there isnt plugin Pawn.CMD and sscanf.
wtf are you doing?
Reply
#4

You would help me or the reason why I ask is because it is the only system of storage to be used and I really need it thanks to the help of the Gods of the Pawno, believe me that if I knew I would not be here.

Sorry if my English is not well understood but I do not speak it very well.
Reply
#5

This is like you released a whole filterscript not asking for help.You might wanna delete the useless part of the text we cba to read.
Reply
#6

Help, I really need you please I will be very grateful to that person to help me!
Reply
#7

I would appreciate the help I really need!
Reply
#8

You'd get more help if you edit/make a smaller thread. Nobody's going to read this cluster fuck of a thread.
Reply
#9

As someone told you already use sscanf, that's too much scripting.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)