allfine but if i type any cmd i.e /heal there was written
you successful healed
invalid command
why?
you successful healed
invalid command
why?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Xhefri on Oct 02, 2018, 06:41 PMUse this to send a message that only the player can see:i am new but u know how to do can u please add in this.....MessagePlayer( "[#FF4500]WRITE THE TEXT HERE ", player );
And this to send message to everyone in server:Message("[#FF4500]WRITE THE TEXT HERE");
Quote from: Humzasajjad on Sep 30, 2018, 03:59 PMIf i write anycommand which is not exist in script there was written invalid command plz tell me any script....i need this function.i really need plz give me.plz
Quote from: Tajammul on Sep 28, 2018, 07:05 AMelse if ( ( cmd == "admincmds" ) || ( cmd == "acmds" ) )[/noae]it gets onscriptload error..what to do?
{
local lvl = GetLevel(player);
if ( lvl.tointeger() == 2 )
{
MessagePlayer(RED+"========== "+YELLOW+"Traner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+" "+LGREEN+"admininfo, ann, setweather, clear, kick",player);
}
else if ( lvl.tointeger() == 3 )
{
MessagePlayer(RED+"========== "+YELLOW+"Moderator Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+" "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, taxijump,",player);
MessagePlayer(RED+" "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip",player);
}
else if ( lvl.tointeger() == 4 )
{
MessagePlayer(RED+"========== "+YELLOW+"Admin Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+" "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, stuntbike",player);
MessagePlayer(RED+" "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+" "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+" "+LGREEN+"unjail, waterdrive",player);
}
else if ( lvl.tointeger() == 5 )
{
MessagePlayer(RED+"========== "+YELLOW+"Management Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+" "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+" "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+" "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+" "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+" "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair",player);
}
else if ( lvl.tointeger() == 6 )
{
MessagePlayer(RED+"========== "+YELLOW+"Co-Owner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+" "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+" "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+" "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+" "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+" "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair, killplayer, setmon,",player);
MessagePlayer(RED+" "+LGREEN+"getall, spawncar, macban2, unmacban2",player);
}
else if ( lvl.tointeger() == 7 )
{
MessagePlayer(RED+"========== "+YELLOW+"Server Owner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+" "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+" "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+" "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+" "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+" "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair, killplayer, setmon,",player);
MessagePlayer(RED+" "+LGREEN+"getall, spawncar, macban2, unmacban2, addadmin, deladmin, setlevel,",player);
MessagePlayer(RED+" "+LGREEN+"setkills, setkilleds, setdeaths, exec, setwlevel, playerimmunity, vehimmunity,disarmall,sethp,setarmour,pcg,chee",player);
}
}
}
Quote from: Mahmoud Tornado on Sep 20, 2018, 01:03 PMit works but when i type /setlevel <myname> <lvl>there was no message and change...what to do?Quote from: Humzasajjad on Sep 20, 2018, 11:49 AMQuerySQL(db, "create table if not exists Database ( Name TEXT, LowerName TEXT, Password VARCHAR(255), Level NUMERIC DEFAULT 1, IP VARCHAR(255) ");This /setlevel command, for the second system not the first.
if ( cmd == "setlevel" )
{
if ( !text ) MessagePlayer( "/"+cmd+" <Nick/id> <Level>", player );
else
{
local
plr = GetPlayer( GetTok( text, " ", 1 ) ),
lvl = GetTok( text, " ", 2),
if ( !plr ) MessagePlayer( "Unknown Player..", player );
else if ( !lvl ) MessagePlayer("You must put a level.", player);
else if ( !IsNum( lvl ) ) MessagePlayer("Level must be in numbers.", player);
else
{
local q = QuerySQL(Admindb, "SELECT * FROM Admins WHERE Name = '" + escapeSQLString(plr.Name) + "'");
if (!q) QuerySQL( DataBase, "INSERT INTO Accounts ( Name, LowerName, Level ) VALUES ( '" + escapeSQLString(plr.Name) + "','" + escapeSQLString(plr.Name) + "','" + 0 + "')" );
else
{
Stats[ plr.ID ].Level = lvl.tointeger();
QuerySQL( Admindb, "UPDATE Admins SET Level='"+lvl+"' WHERE Name LIKE '" + plr.Name + "'" );
Message("Administration Command: Admin "+player.Name+" Has Set "+plr.Name+" As an admin level: "+lvl+".");
}
}
}
}
bro when i add this there was on script load error comes
For the first will being like that,else if ( cmd == "setlevel" )
{
if ( !text ) MessagePlayer( "/"+cmd+" <Nick/id> <Level>", player );
else
{
local
plr = GetPlayer( GetTok( text, " ", 1 ) ),
lvl = GetTok( text, " ", 2);
if ( !plr ) MessagePlayer( "Unknown Player..", player );
else if ( !lvl ) MessagePlayer("You must put a level.", player);
else if ( !IsNum( lvl ) ) MessagePlayer("Level must be in numbers.", player);
else
{
Stats[ plr.ID ].Level = lvl.tointeger();
QuerySQL( db,"UPDATE Database SET Level='"+lvl+"' WHERE lower(Name) LIKE '"+plr.Name+"'");
Message("Administration Command: Admin "+player.Name+" Has Set level of "+plr.Name+" to: "+lvl+".");
}
}
}