suddenly admin.nut leave working which cmds in admin.nut when i type that cmds says unknow cmds i also add admin.nut in main.nut iadd do file but not works 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 Menufunction Register( player, password )
{
try{
local pass = e(password);
QuerySQL( db, "INSERT INTO Account ( Name, IP, Level, Pass, Kills, Deaths, Cash, Bank, Joins, nogoto, DateRegistered, WonLMS, RandSpawn ) VALUES ( '" + player.Name.tolower() + "', '" + player.IP + "', 1, '" + pass + "', 0, 0, 0, 0, 0, 'off', '" + GetFullTime() + "', 0, 'on' )" );
QuerySQL( db, "REPLACE INTO Bstats ( Name, User, Body, Torso, LeftArm, RightArm, LeftLeg, RightLeg, Head ) VALUES ( '" + player.Name.tolower() + "', '" + player.Name + "', 0, 0, 0, 0, 0, 0, 0 )" );
QuerySQL( db, "REPLACE INTO Wstats ( Name, User, Fist, BrassKnuckle, ScrewDriver, GolfClub, NightStick, Knife, BaseballBat, Hammer, Cleaver, Machete, Katana, Chainsaw, Grenade, RemoteGrenade, TearGas, Molotov, Missile, Colt45, Python, Shotgun, Spaz , Stubby, Tec9, Uzi, Ingrams, MP5, M4, Ruger, SniperRifle, LaserScope, RocketLauncher, FlameThrower, M60 ) VALUES ( '" + player.Name.tolower() + "', '" + player.Name + "', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )" );
IncCash( player, 2000 );
status[ player.ID ].IsLogged = true;
status[ player.ID ].IsReg = true;
ePrivMessage( "You've Registered!", player );
ePrivMessage( "Nick:[ " + player.Name + " ] Password:[ " + password + " ]", player );
rMessage( ">> " + player.Name + " is successfully registered with us" );
Message( "[#00ff00][Achievement]: [#FF0000]" + player.Name + " Has unlocked an achievement: [#00FFFF][Experiencing test]." );
}
catch(e) print( "Reg Function Error: " + e );
}
cmdsif ( cmd == "register" )
{
if ( status[ player.ID ].IsReg == true ) ePrivMessage( "[Error] - You're Already Registered!", player );
else if ( !text ) ePrivMessage( "[Syntax] - / " + cmd + " <Password>", player );
else
{
Register( player, text );
}
}
else if ( cmd == "car" )
{
local plr = GetPlayer( text );
if ( !text ) MessagePlayer( "[Syntax] - /" + cmd + " <Nick/ID>.", player );
else{
if ( !plr ) MessagePlayer( "[Error] - Invalid Nick/ID", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[Error] - This player hasn't spawned.", player );
else
{
local veh = plr.Vehicle;
if ( veh )
{
local vid = veh.ID, hp = veh.Health.tointeger() /10;
MessagePlayer( plr + " is driving a " + GetVehicleNameFromModel( veh.Model ) + " (ID: " + vid + ") (Health: " + hp + "%)", player );
local q = QuerySQL( db, "SELECT * FROM Vehicles WHERE ID='" + veh.ID + "'" );
MessagePlayer( "Vehicle:[ " + GetVehicleNameFromModel( veh.Model ) + " ] Cost:[ " + GetSQLColumnData( q, 1 ) + " ]", player );
MessagePlayer( "ID:[ " + veh.ID + " ] Owner:[ " + GetSQLColumnData( q, 2 ) + " ] Share:[ " + GetSQLColumnData( q, 3 ) + " ]", player );
}
else MessagePlayer( plr + " is currently on foot.", player );
}
}
}
function onPlayerEnterVehicle( player, vehicle, isPassenger )
{
Announce( "~b~ ID ~p~" + vehicle.ID + ".",player,4);
MessagePlayer("[#1fcecb]Press [#50c878]I[#1fcecb] rapidly to activate boost .",player);
MessagePlayer("[#FFFFFF]Have 100000?.Type /buycar " + vehicle.ID + " to buy this car if its forsale",player);
return 1;
}
function onPlayerExitVehicle( player, vehicle )
{
Announce( "~b~ ID ~p~" + vehicle.ID + ".",player,4);
ePrivMessage("Exit Vehicle ID: " + vehicle.ID + ".",player);
}
if ( status[ player.ID ].PHidden == true ) status[ player.ID ].PHidden = false;
function cKick( p )
{
if ( status[ p.ID ].PHidden == true ) status[ p.ID ].PHidden = false;
if (status[p.ID].JoinLMS == 1)
{
status[p.ID].JoinLMS = 0;
gLMS.CountLMS--;
Winner.remove( Winner.find( p.ID ) );
checklms();
}
SetPlayerSpree(p);
SaveStats( p );
KickPlayer( p );
}
function KickPlr(identifier)
{
if (typeof identifier != "integer" && typeof identifier != "string") return;
local player = FindPlayer(identifier);
if (typeof player == "instance")
{
if (pinfo[id].Logged == true) SavePlayerData(id);
pinfo[id] = null;
KickPlayer(player);
}
}