Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Cerere tutorial Sistem de /buylevel ca pe Bugged sau alte servere.


Recommended Posts

Posted

Descriere tutorial: Salut caut si eu un sistem de /buylevel ca bugged b-zone etc cum sunt pe serverele de rpg. Serverul meu este pe mysql si na gasit nici unu pe mysql sa pot sa-l pun in gamemode. Asa ca am ales sa apelez aici.

Posted
CMD:buylevel(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		if(playerVariables[playerid][pLevel] >= 0)
		{
			new nxtlevel = playerVariables[playerid][pLevel];
			new expamount = nxtlevel*levelexp;
			new infostring[256], string[256];
		    if (playerVariables[playerid][pRPoints] < expamount)
			{
				format(infostring, 256, "You need %d Respect Points, you curently have [%d] !",expamount,playerVariables[playerid][pRPoints]);
				SendClientMessage(playerid, COLOR_WHITE, infostring);
				return 1;
			}
			else
			{
			    playerVariables[playerid][pRPoints] -= expamount;
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				playerVariables[playerid][pLevel]++;
				format(string, 256, "Felicitari, acum ai level %d!",playerVariables[playerid][pLevel]);
				SCM(playerid, COLOR_TEAL, string);
				return 1;
			}
		}
  		return 1;
	}
	return 1;
}

Inlocuiesti cu ce variabile ai la tine in script.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Posted
CMD:buylevel(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		if(playerVariables[playerid][pLevel] >= 0)
		{
			new nxtlevel = playerVariables[playerid][pLevel];
			new expamount = nxtlevel*levelexp;
			new infostring[256], string[256];
		    if (playerVariables[playerid][pRPoints] < expamount)
			{
				format(infostring, 256, "You need %d Respect Points, you curently have [%d] !",expamount,playerVariables[playerid][pRPoints]);
				SendClientMessage(playerid, COLOR_WHITE, infostring);
				return 1;
			}
			else
			{
			    playerVariables[playerid][pRPoints] -= expamount;
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				playerVariables[playerid][pLevel]++;
				format(string, 256, "Felicitari, acum ai level %d!",playerVariables[playerid][pLevel]);
				SCM(playerid, COLOR_TEAL, string);
				return 1;
			}
		}
  		return 1;
	}
	return 1;
}

Inlocuiesti cu ce variabile ai la tine in script.

Nu e corect ce ai tu acolo. El doreste sa faca pe mysql comanda. Tu nu ai explicat nimic si nu e buna pentru el pentru ca e nevoie si de update.Doreste ceva de la 0 cu RespectPoint cu tot. Mi-a dat detalii in PM.

 

Gotze am sa iti fac eu in scurt timp 2 tutoriale de genu pe mysql. Rabdare sa ai.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.