When I unban a person the command works perfectly and it deletes the players ban info Frm database but prb is when player try to join it kicks saying player is ban but when I restart server the player is unbanned plz help
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 Menuelse if (cmd == "freeze"){
if ( params.len() < 2) MessagePlayer(msg.C +" /"+ cmd +" <All/Nick/ID> <text>", player );
else if (params[0].tolower() == "all"){
foreach(i, val in playerson){
FindPlayer(i).IsFrozen = true;
}
Message(msg.I +" Admin "+ player.Name +" has frozen everyone in the server. Reason : " + params[1] );
}
else if ( !GetPlayer(params[0]) ) MessagePlayer( msg.E +" Unknown Player", player );
else {
GetPlayer(params[0]).IsFrozen = true;
Message(msg.I +" Admin "+ player.Name +" has freezed "+GetPlayer(params[0])+" in the server. Reason : " + params[1] );
}
}
else if (cmd == "unfreeze"){
if ( params.len() < 2) MessagePlayer(msg.C +" /"+ cmd +" <All/Nick/ID> <text>", player );
else if (params[0].tolower() == "all"){
foreach(i, val in playerson){
FindPlayer(i).IsFrozen = false;
}
Message( msg.I +"Admin "+ player.Name +" has unfreezed everyone in the server. Reason : " + params[1] );
}
else if ( !GetPlayer(params[0]) ) MessagePlayer( msg.E +" Unknown Player", player );
else {
GetPlayer(params[0]).IsFrozen = false;
Message( msg.I + "Admin "+ player.Name +" has unfreezed "+GetPlayer(params[0])+" in the server. Reason : " + params[1] );
}
}
[/spoiler]
CreateVehicle(6420, 1, Vector(-363.606292724609, -524.068786621094, 12.6005363464355), 0.1268, 20, 20);
Either you can use cmd but that will disappear after restarting serverelse if ( cmd == "hydra" )
{
CreateVehicle( 6420, player.World, Vector(player.Pos.x, player.Pos.y, player.Pos.z), 0, 12, 13 );
}
constructor( playerName, dbGlobal )
{
local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP FROM Accounts WHERE Name='" + playerName + "' AND NameLower='" + playerName.tolower() + "'" );
if( ::GetSQLColumnData( query, 5 ) )
{
Cash = ::GetSQLColumnData( query, 0 );
Bank = ::GetSQLColumnData( query, 1 );
Kills = ::GetSQLColumnData( query, 2 );
Deaths = ::GetSQLColumnData( query, 3 );
Level = ::GetSQLColumnData( query, 4 );
LastUsedIP = ::GetSQLColumnData( query, 5 );
}
::FreeSQLQuery( query );
local q = ::QuerySQL( dbGlobal, "SELECT Played, Won, Lost FROM LMS WHERE Name='" + playerName.tolower() + "'" );
if( ::GetSQLColumnData( q, 2 ) )
{
Played = ::GetSQLColumnData( q, 0 );
Wins = ::GetSQLColumnData( q, 1 );
Lost = ::GetSQLColumnData( q, 2 );
}
::FreeSQLQuery( q );
}
function Join( player ){
if( Level == 0 ){
::MessagePlayer( "Please register to play.", player );
::MessagePlayer( "Register with /register <password>", player );
}
else if( LastUsedIP == player.IP ){
Logged = true;
player.Cash = stats[ player.ID ].Cash;
::MessagePlayer( "Welcome back!", player );
}
else{
::MessagePlayer( "Please login to play.", player );
::MessagePlayer( "Login with /login <password>", player );
}
}
function Update( player, dbGlobal ){
::QuerySQL( dbGlobal, "UPDATE Accounts SET Cash=" + Cash + ", Bank=" + Bank + ", Kills=" + Kills + ", Deaths=" + Deaths + ", Level=" + Level + ", LastUsedIP='" + LastUsedIP + "' WHERE Name='" + player.Name + "' AND NameLower='" + player.Name.tolower() + "'" );
::QuerySQL( dbGlobal, "UPDATE LMS SET Lost=" + Lost + ", Played=" + Played + ", Won=" + Wins + " WHERE Name='" + player.Name.tolower() + "'" );
}