Jump to content

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


SkyLeAs

Recommended Posts

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

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.