Author Topic: help-par1  (Read 2399 times)

0 Members and 1 Guest are viewing this topic.

Offline scripter_pawn

  • Street Thug
  • *
  • Posts: 30
    • View Profile
help-par1
« on: December 15, 2011, 09:22:39 pm »
Code: [Select]
else if ( cmd == "setlevel")
{
local level = RFSLevel(player);
local lvl = GetTok(text, " ",2);
local plr = FindPlayer(GetTok(text, " ",1));
if ( level < 4 ) PrivMessage("You need at least level 4 to use this command",player);
else if ( !IsNum(lvl) ) PrivMessage("Level must be numbers",player);
else if (( lvl < 0 ) || ( lvl > 4 ) ) PrivMessage("Level must be from 1-4",player);
else if ( !plr ) PrivMessage("Invalid player",player);
else if ( !lvl ) PrivMessage("USE : /c setlevel [level]",player);
else
{
PrivMessage("You has setted "+plr+"'s level to "+lvl,player);
Message("**Admin "+player+" has seted "+plr+"'s level to "+lvl);
WriteIniInteger("Accounts.ini",plr.Name,"level",lvl.tointeger());
}
}

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: help-par1
« Reply #1 on: December 15, 2011, 11:38:45 pm »
So what's the problem? Your code alone tells us nothing.

Also, you're better off getting help here:
http://vcmp.liberty-unleashed.co.uk
Do not PM me for support.




Offline scripter_pawn

  • Street Thug
  • *
  • Posts: 30
    • View Profile
Re: help-par1
« Reply #2 on: December 16, 2011, 12:24:32 am »
anyways there was a problem with lvl.tointeger()