How to change /buylevel a /levelup
#1

Command /buylevel it right when in use to raise the level it should pay
nah I want to change that to /levelup and do not pay, what you guys here have his command? help me
I need it all.

I have a command levelup but BUG.,

Код:
CMD:levelup(playerid, params[])
{
	if (gPlayerLogged{playerid} != 0)
	{
		if(PlayerInfo[playerid][pLevel] >= 0)
		{
			new nxtlevel = PlayerInfo[playerid][pLevel]+1;
			new expamount = nxtlevel*levelexp;

			{
				new string[58];
				format(string, sizeof(string), "You need %d more respect points to buy your next level.", expamount - PlayerInfo[playerid][pExp]);
				SendClientMessageEx(playerid, COLOR_GRAD1, string);
				return 1;
			}
				new string[92];
				format(string, sizeof(string), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				PlayerInfo[playerid][pLevel]++;
				PlayerInfo[playerid][pExp] = PlayerInfo[playerid][pExp]-expamount;
				PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
				GameTextForPlayer(playerid, string, 5000, 1);
				format(string, sizeof(string), "Kamu telah naik level %s, dan mendapatkan upgrade point sebanyak %i /upgrade untuk memakainya", nxtlevel, PlayerInfo[playerid][gPupgrade]);
				SendClientMessageEx(playerid, COLOR_GRAD1, string);
				SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
				if(PlayerInfo[playerid][pLevel] == 6)
				{
				    SendClientMessageEx(playerid, COLOR_GRAD1, "Newbie chat will now be automatically togged off on login.");
				}
			}
		}
		return 1;
	}
Код:
C:\Users\pc7\Downloads\Respect 1\gamemodes\RCRP.pwn(32048) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)