Menu

Show posts

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 Menu

Topics - Coolkid

#1
Scripting and Server Management / vehicle id
Jun 23, 2016, 04:41 PM
how can i get vehicle id after creating it without sitting in it?

i am creating a vehicle system but i coulbot figure out how could i get vehicle id without sitting in it

Thanks in advance
#2
Servers / Killerskingdom Server
Jun 09, 2016, 12:06 AM

______________________________________________----------------------------------------------------------
Server Name == [BOSS] KillersKingdom Server [jeahha hosting]
Server ip===== 146.185.143.200:8192
Server Hoster==Coolboy
Server Forum=== Killerskingdom.cf
Scirpted By=== Coolboy , Mystermike
Helpers=== Woodland , Necrose, Diego
Server IRC===#boss LUNet
Credits== WOODLAND COOLBOY AND MYSTERMIKE
Partial Credit== DNUS as refrence
_____________________________________________________________
COME AND SHOW URS BEST** 8)
#3
Scripting and Server Management / gravity
Jun 07, 2016, 02:40 AM
is it possible to change gravity of only 1 world and it dont affect other world
#4
General Discussion / IRC help
May 15, 2016, 12:55 AM
i didnot knew right place to post so i am posting here

is it possible to know who is using /bs say
#5
Off-Topic General / Which mobile you use
May 13, 2016, 02:49 AM
i use iphone 6s 16 gb

which mobile you all use?
#6
function Richie(player, amount)
{
local q = QuerySQL(db, "SELECT Name,Amount FROM Rich WHERE Name LIKE '"+player.Name+"'");
local cash = GetSQLColumnData( q, 1 ).tostring();
local add = cash + amount;
if (GetSQLColumnData(q,0) == null)
{
QuerySQL(db, "INSERT INTO Rich (Name, Amount) VALUES ('"+player.Name+"', '"+amount.tointeger()+"')");
}
if (GetSQLColumnData(q,0) == player.Name );
{
QuerySQL(db, "UPDATE Rich SET Amount='"+ add+ "' WHERE Name LIKE '" + player.Name + "'");
}
FreeSQLQuery( q );
}

AN ERROR HAS OCCURED [the index 'tostring' does not exist]

CALLSTACK
*FUNCTION [Richie()] Scripts/Functions.nut line [1811]
*FUNCTION [onPlayerCommand2()] Scripts/Commands.nut line [4638]
*FUNCTION [onPlayerChat()] Scripts/DNUS-SQ.nut line [626]

LOCALS
[q] NULL
[amount] 5555
[player] INSTANCE
[this] TABLE
[cash] 5555500
[Pos] INSTANCE
[text] "5555"
[cmd] "donate"
[player] INSTANCE
[this] TABLE
[xp] NULL
2
[text] "!donate 5555"
[player] INSTANCE
[this] TABLE
[SCRIPT]  UnLoaded DM/FR
** Shutting down server **

line 1811 is local cash = GetSQLColumnData( q, 1 ).tostring();
#7
As the topic says is it possible to teleport a player to another server using a pickup
#9
Scripting and Server Management / last active
Apr 20, 2016, 09:05 PM
the function gives the last active in wring month all other things r fine but it delivers month one back for example the data of today would be 20/3/2016 15:55:28 one moth back

[spoiler="command"]function LastActive(player)
{
local now = date();
local q = QuerySQL(db, "SELECT Name,LADate FROM LastActive WHERE Name='"+player.Name+"'");
if (GetSQLColumnData(q,0) == null)
{
QuerySQL(db, "INSERT INTO LastActive (Name, LADate) VALUES ('"+player.Name+"', '"+ now.day + "/" + now.month + "/" + now.year + " " + now.hour + ":" + now.min + ":" + now.sec +"')");
}
if (GetSQLColumnData(q,0) == player.Name)
{
QuerySQL(db, "UPDATE LastActive SET LADate='"+ now.day + "/" + now.month + "/" + now.year + " " + now.hour + ":" + now.min + ":" + now.sec + "' WHERE Name='" + player.Name + "'");
}
FreeSQLQuery( q );
}
[/spoiler]
#10
whats am i doing wrong in this command

instead of function i thought of making command so i can disable and enable back fpv without any function

[spoiler="command"]
else if ( cmd == "disablefpv" )
{
SetWeaponDataValue(26, 12, 0x200 );
SetWeaponDataValue(27, 12, 0x200 );
SetWeaponDataValue(32, 12, 0x200 );
 Message("Admin Disabled FPV!");
}
[/spoiler]
#11
General Discussion / Vps buying suggestion
Apr 01, 2016, 12:21 PM
I have thought of buying vps will Windows e better or Linux
#12
hi guys i am not asking for any codes i just want to ask how can i get total time played
#13
Applications / App for server host
Mar 27, 2016, 10:45 PM
User Name: Coolkid
Email Address:[have sended by pm]
Server Name:[0.4]Killers Kingdom
Port:5195
Slots(10-100):30

#14
hi
   when i ban a player he is banned for right time but problem is it shows negative values as u can see in pictures here is my code
function Banned( player )
{
      local query = QuerySQL( database, "SELECT * FROM Banned WHERE ban_nick='" + player.Name + "' COLLATE NOCASE" ), Ip = player.IP.tostring();
   if( GetSQLColumnData( query, 0 )  )
   {
         if( ( time() - GetSQLColumnData( query, 2 ).tointeger() ) >= GetSQLColumnData( query, 3 ).tointeger() )
   {
       local query2 = QuerySQL( database, "DELETE FROM Banned WHERE ban_nick='" + player.Name.tostring() + "'" );
    FreeSQLQuery( query2 );
       MessagePlayer(GREEN+"[RBAN] Your ban has been expired.", player );
    MessagePlayer(ORANGE+"[RBAN] Stick to the rules or you will get permanently banned.", player );
   }
   else
   {
        local Time_Left = TimeRem( GetSQLColumnData( query, 2 ).tointeger(), GetSQLColumnData( query, 4 ) );
        //local splitban = split(  GetSQLColumnData( query, 4 ), ":"  ), Calc = splitban[ 0 ] + " Day(s), " + splitban[ 1 ] + " Hour(s), " + splitban[ 2 ] + " Minute(s).";
        MessagePlayer(RED+"[RBAN] Your ban has not expired.", player );
     MessagePlayer(ORANGE+"[RBAN] Your ban is set to expire in " + Time_Left, player );
Message(RED+" Enforcing prior ban on:["+player.Name+"] Reason:["+GetSQLColumnData( query, 6 )+"]Time left:["+Time_Left+"]")
EchoMessage(ICOL_RED+" Enforcing prior ban on:["+player.Name+"] Reason:["+GetSQLColumnData( query, 6 )+"]Time left:["+Time_Left+"]")
     KickPlayer( player );
   }
   }
   else if( GetSQLColumnData( QuerySQL( database, "SELECT * FROM Banned WHERE ban_ip='" + Ip + "'" ), 0 ) )
   {
         local query = QuerySQL( database, "SELECT * FROM Banned WHERE ban_ip='" + Ip + "'" );
         if( ( time() - GetSQLColumnData( query, 2 ).tointeger() ) >= GetSQLColumnData( query, 3 ).tointeger() )
   {
       local query2 = QuerySQL( database, "DELETE FROM Banned WHERE ban_ip='" + player.IP.tostring() + "'" );
    FreeSQLQuery( query2 );
       MessagePlayer(RED+"[RBAN] Your ban has been expired.", player );
    MessagePlayer(ORANGE+"[RBAN] Stick to the rules or you will get permanently banned.", player );
   }
   else
   {
        local Time_Left = TimeRem( GetSQLColumnData( query, 2 ).tointeger(), GetSQLColumnData( query, 4 ).tostring() );
        //local splitban = split(  GetSQLColumnData( query, 4 ), ":"  ), Calc = splitban[ 0 ] + " Day(s), " + splitban[ 1 ] + " Hour(s), " + splitban[ 2 ] + " Minute(s).";
        MessagePlayer("[RBAN] Your ban has not expired.", player );
     MessagePlayer(ORANGE+"[RBAN] Your ban is set to expire in. " + Time_Left , player );
  Message(RED+" Enforcing prior ban on:["+player.Name+"] Reason:["+GetSQLColumnData( query, 6 )+"]Time left:["+Time_Left+"]")
EchoMessage(ICOL_RED+" Enforcing prior ban on:["+player.Name+"] Reason:["+GetSQLColumnData( query, 6 )+"]Time left:["+Time_Left+"]")
     KickPlayer( player );
   }
   }
   FreeSQLQuery( query );
}
function TimeRem( bantime,  banratio )
{
        local ban_current = time()-bantime, sp = split(banratio,":"), ban_Days = 0, ban_Hours = 0, ban_Minutes = 0,
  ban_Day = sp[ 0 ].tointeger(),
  ban_Hour = sp[ 1 ].tointeger(),
  ban_Minute = sp[ 2 ].tointeger();
  bantime = ban_Day + ban_Hour + ban_Minute;
  ban_Days = ban_current/86400;
  ban_current = ban_current%86400;
  ban_Hours = ban_current/3600;
  ban_current = ban_current%3600;
  ban_Minutes = ban_current/60;
  ban_current = ban_current%60;
  ban_Day -= ban_Days;
  ban_Hour -= ban_Hours;
  ban_Minute -= ban_Minutes;
  return ban_Day + " Day(s), " + ban_Hour + " Hour(s), " + ban_Minute + " Minutes.";
}

#15
Support / announce
Mar 15, 2016, 02:31 AM
announcer:failed to store response from master.vc-mp.org

i am getting this on servver console and my server is not being shown in masterlist

my ports are forwarded

after some times thijin server checker says it is there on master lsit but like after 1 hour same announce rmessage will start to appear any help regarding announce
#16
User Name:[BOSS]Coolboy1
Sub-domain:killerskingdom
Email Address:i will pm you
What are you planning to do with this Webhost?:I am hosting our server now it is probably 24 hours and to organize the stuff of server
Forum Software(Optional):SMF
Extra Information:plz accept my Web host


i am extremely sorry for that kind of behavior
#17
Applications / Webhost App
Mar 10, 2016, 11:00 PM
User Name:[BOSS]Coolboy1
Sub-domain:killerskingdom
Email Address:i will pm you
What are you planning to do with this Webhost?:I am hosting our server now it is probably 24 hours and to organize the stuff of server
Forum Software(Optional):SMF
Extra Information:plz accept my Web host
#18
Support / reconnect server crash
Mar 09, 2016, 03:22 AM
hi all
my problem is when i try to reconnect the server show that the name already exists and kicks the player and crashes here are the scrren shots
http://imgur.com/a/SHKiu

My stats function
[spoiler]function SaveStats( player )
{
try{
local id = player.ID;
if ( (status[ id ].IsReg == true) && (status[ id ].IsLogged == true) )
{
QuerySQL( db, "UPDATE Account SET Kills='" + status[ id ].Kills + "', Killeds='" + status[ id ].Killeds + "', Deaths='" + status[ player.ID ].Deaths + "', Cash='" + status[ id ].Cash + "', Bank='" + status[ id ].Bank + "', Joins='" + status[id].Joins + "' WHERE Name='" + player.Name.tolower() + "'" );
print( "Saved Stats of Player " + player.Name + "[" + player.ID + "]" );
status[ id ] = null;
}
}
catch(e) print( "Save Stats Error: " + e );
}
function onPlayerPart( player, reason )
{
local Text = "Unknown";
switch ( reason )
{
case PARTREASON_QUIT:
Text = "Quit";
break;
case PARTREASON_DISCONNECTED:
Text = "Leaving";
break;
case PARTREASON_TIMEOUT:
Text = "Timeout";
break;
case PARTREASON_KICKED:
Text = "Kicked";
break;
case PARTREASON_BANNED:
Text = "Banned";
break;
case PARTREASON_CRASHED:
Text = "Game-Crashed";
break;
}
EchoMessage(ICOL_RED+ICOL_BOLD+"** >> ID:[ "+player.ID+" ] "+player.Name+" Has Left The Server.("+Text+")");
Message(RED+"** >> ID:[ "+GetTeamToRGB(player.Team)+""+player.ID+""+RED+" ] "+GetTeamToRGB(player.Team)+""+player.Name+" "+ORANGE+"Has Left The Server."+ORANGE+"("+Text+")");
print("** ID:[ "+player.ID+" ] "+player.Name+" Has Left The Server.("+Text+")");
if ( status[ player.ID ].PHidden == true ) status[ player.ID ].PHidden = false;
if ( status[ player.ID ].chat == 1 ) status[ player.ID ].chat = 0;
{
EndKillingSpree(player,255);
SetPlayerSpree(player);
menuRageQuit( player );
SaveStats( player );
savespawnwep(player.Name,player.ID);
}
for (local i = g_FPS.len()-1; i >= 0; i--)
{if (g_FPS[i].Player.ID == player.ID)
{if (g_FPS[i].Text != null) g_FPS[i].Text.Delete();
g_FPS.remove(i);
break;}
}
for (local i = g_DIS.len()-1; i >= 0; i--)
{if (g_DIS[i].Player.ID == player.ID)
{if (g_DIS[i].Dist != null) g_DIS[i].Dist.Delete();
g_DIS.remove(i);
break;}
}
for (local i = g_ST.len()-1; i >= 0; i--)
{if (g_ST[i].Player.ID == player.ID)
{if (g_ST[i].ST != null) g_ST[i].ST.Delete();
g_ST.remove(i);
break;}
}
for (local i = g_DM.len()-1; i >= 0; i--)
{if (g_DM[i].Player.ID == player.ID)
{if (g_DM[i].DM != null) g_DM[i].DM.Delete();
g_DM.remove(i);
break;}
}
if ( GetPlayers()-1 == 0 )
{
speedometer.Paused = true;
timer_status = false;
}
if ( GetPlayers()-1 == 0 )
{
secretgate.Paused = true;
sec_status = false;
}
if ( GetPlayers()-1 == 0 )
{
armygate.Paused = true;
army_status = false;
}
if(player.World==1){
if(Max[player.ID]==true){
WorldCounter[1]-=1;
if(WorldCounter[1]==-1){WorldCounter[1]=0;}}
}
if(player.World==2){
if(Max[player.ID]==true){
WorldCounter[2]-=1;
if(WorldCounter[2]==-1){WorldCounter[2]=0;}}
}
if(SpawnKill[player.ID]==true){SpawnKill[ player.ID ]=false;}
}
[/spoiler]
#19
Support / geoip
Mar 05, 2016, 07:16 PM
my geoip only give 2 letter country code how to get full name

function onPlayerJoin(player) {
    local country = geoip_country_name_by_addr(player.IP);
    if (country != null) // the plugin returned a meaningful result
        Message("* " + player.Name + " is connecting from " + country + ". [" + geoip_country_code_by_addr(player.IP) + "]");
}
#20
Scripting and Server Management / tempban
Mar 05, 2016, 01:49 AM
hi i am having prb with my ban it gives me this error


Code'
[spoiler]
function onScriptLoad()
{
database <- ConnectSQL( "Data.sqlite" );
     QuerySQL( database, "CREATE TABLE IF NOT EXISTS Banned( ban_nick TEXT, ban_ip TEXT, ban_time TEXT, ban_expire TEXT, ban_expireratio TEXT, ban_admin TEXT, ban_reason TEXT )" );
  print("[RBAN] Rocky's Ban system Loaded (v0.1)");
}
function onPlayerJoin( player )
{
     NewTimer( "Banned", 3000, 1,  player ); //Check if player is banned.
}
function onPlayerCommand( player, cmd, text )
{
  cmd = cmd.tolower();
     if ( cmd == "tempban" )
     {
       local txt_Split;
          if( !text ) MessagePlayer("[RBAN] /c tempban <player> <day:hour:min> <reason>", player);
          else
          {
                if( NumTok( text, " " ) == 2 )
    {
         txt_Split = split( text, " " );
      local plr = FindPlayer( txt_Split[ 0 ] ), expire = txt_Split[ 1 ];
      if( plr ) AddBan( player, plr, expire );
      else MessagePlayer("[RBAN] No such player.", player );
    }
     else if( NumTok( text, " " ) >= 3 )
            {
                                           txt_Split = split( text, " " );
                                           local plr = FindPlayer( txt_Split[ 0 ] ), expire = txt_Split[ 1 ], reason = GetTok( text, " ", 3, NumTok( text, " " ) );
      if( plr ) AddBan( player, plr, expire, reason );
      else MessagePlayer("[RBAN] No such player.", player );
    }
    else MessagePlayer("[RBAN] /c tempban <player> <day:hour:min> <reason>", player);
    }
     }
  else if( cmd == "untempban" )
  {
    if( !text ) MessagePlayer("[RBAN] /c untempban <Fullname>", player);
    else if( !IsBanned( text ) ) MessagePlayer("[RBAN]Player is not banned.", player);
    else
    {
           QuerySQL( database, "DELETE TABLE FROM Banned WHERE ban_nick='" + text + "' COLLATE NOCASE" );
     Message("Unbanned: [ " + text + " ] by Admin: [ " + player.Name + " ]" );
    }
  }
}
function Banned( player )
{
      local query = QuerySQL( database, "SELECT * FROM Banned WHERE ban_nick='" + player.Name + "' COLLATE NOCASE" ), Ip = player.IP.tostring();
   if( GetSQLColumnData( query, 0 )  )
   {
         if( ( time() - GetSQLColumnData( query, 2 ).tointeger() ) >= GetSQLColumnData( query, 3 ).tointeger() )
   {
       local query2 = QuerySQL( database, "DELETE FROM Banned WHERE ban_nick='" + player.Name.tostring() + "'" );
    FreeSQLQuery( query2 );
       MessagePlayer("[RBAN] Your ban has been expired.", player );
    MessagePlayer("[RBAN] Stick to the rules or you will get permanently banned.", player );
   }
   else
   {
        local Time_Left = TimeRem( GetSQLColumnData( query, 2 ).tointeger(), GetSQLColumnData( query, 4 ) );
        //local splitban = split(  GetSQLColumnData( query, 4 ), ":"  ), Calc = splitban[ 0 ] + " Day(s), " + splitban[ 1 ] + " Hour(s), " + splitban[ 2 ] + " Minute(s).";
        MessagePlayer("[RBAN] Your ban has not expired.", player );
     MessagePlayer("[RBAN] Your ban is set to expire in. " + Time_Left, player );
     KickPlayer( player );
   }
   }
   else if( GetSQLColumnData( QuerySQL( database, "SELECT * FROM Banned WHERE ban_ip='" + Ip + "'" ), 0 ) )
   {
         local query = QuerySQL( database, "SELECT * FROM Banned WHERE ban_ip='" + Ip + "'" );
         if( ( time() - GetSQLColumnData( query, 2 ).tointeger() ) >= GetSQLColumnData( query, 3 ).tointeger() )
   {
       local query2 = QuerySQL( database, "DELETE FROM Banned WHERE ban_ip='" + player.IP.tostring() + "'" );
    FreeSQLQuery( query2 );
       MessagePlayer("[RBAN] Your ban has been expired.", player );
    MessagePlayer("[RBAN] Stick to the rules or you will get permanently banned.", player );
   }
   else
   {
        local Time_Left = TimeRem( GetSQLColumnData( query, 2 ).tointeger(), GetSQLColumnData( query, 4 ).tostring() );
        //local splitban = split(  GetSQLColumnData( query, 4 ), ":"  ), Calc = splitban[ 0 ] + " Day(s), " + splitban[ 1 ] + " Hour(s), " + splitban[ 2 ] + " Minute(s).";
        MessagePlayer("[RBAN] Your ban has not expired.", player );
     MessagePlayer("[RBAN] Your ban is set to expire in. " + Time_Left , player );
     KickPlayer( player );
   }
   }
   FreeSQLQuery( query );
}

//GeTok function
function GetTok(string, separator, n, ...)
{
 local m = vargv.len() > 0 ? vargv[0] : n,
    tokenized = split(string, separator),
    text = "";
 
 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
 {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
 }
 return text;
}

//Check is player is banned.
function IsBanned( fullname )
{
      local query = QuerySQL( database, "SELECT ban_ip FROM Banned WHERE ban_nick='" + fullname + "' COLLATE NOCASE" );
   if( GetSQLColumnData( query, 0 )  ) return true;
   return false;
}

//This returns the time left for ban in Day:hour:minute format.
function TimeRem( bantime,  banratio )
{
        local ban_current = time()-bantime, sp = split(banratio,":"), ban_Days, ban_Hours, ban_Minutes,
  ban_Day = sp[ 0 ].tointeger(),
  ban_Hour = sp[ 1 ].tointeger(),
  ban_Minute = sp[ 2 ].tointeger();
  ban_Days = ban_current/86400;
  ban_current = ban_current%86400;
  ban_Hours = ban_current/3600;
  ban_current = ban_current%3600;
  ban_Minutes = ban_current/60;
  ban_current = ban_current%60;
  ban_Day -= ban_Days;
  ban_Hour -= ban_Hours;
  ban_Minute -= ban_Minutes;
  return ban_Day + " Day(s), " + ban_Hour + " Hour(s), " + ban_Minute + " Minutes.";

[/spoiler]