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

Messages - kokia

#1
function LoadBases()
{
local i = 0;
while (i < 35)
{
Bases[i] = BaseClass();
local p = i.tostring();
Bases[i].Name = ReadIniString("bases.ini", p, "name");
Bases[i].CP = ReadIniString("bases.ini", p, "cp");
Bases[i].AttackSpawn = ReadIniString("bases.ini", p, "att");
Bases[i].DefenseSpawn = ReadIniString("bases.ini", p, "def");
i++;
}
}
function LoadPickups()
{
local i = 0;
while (i < 35)
{
local x = (GetTok(Bases[i].CP, ",", 1)).tostring(),
  y = (GetTok(Bases[i].CP, ",", 2)).tofloat(),
      z = (GetTok(Bases[i].CP, ",", 3)).tofloat();
CreatePickup(382, Vector(x, y, z));
i++;
}
 print("Loaded")
}
onserverstart
Bases <- array(35, null);
[spoiler=inifile]
[0]
cp=124.0107,-339.4061,36.2330
def=120.7456,-383.3260,36.3595
att=482.0498,835.1406,25.5501
name=Demolition Man
[1]
cp=345.0126,-276.5771,35.8813
def=297.7665,-209.5041,11.5254
att=482.0498,835.1406,25.5501
name=Construction Yard
[2]
cp=386.1981,-506.6573,9.3983
def=407.4069,-459.3660,10.1193
att=482.0498,835.1406,25.5501
name=VCPD
[3]
cp=-71.3566,83.0857,9.6832
def=-71.3566,83.0857,9.6832
att=482.0498,835.1406,25.5501
name=Bottom of Bridge
[4]
cp=54.5636,-937.9831,24.5730
def=54.5636,-937.9831,24.5730
att=482.0498,835.1406,25.5501
name=South Point Mall
[5]
cp=308.9213,1161.0549,22.7474
def=312.7891,1194.6662,22.7474
att=482.0498,835.1406,25.5501
name=Carpark
[6]
cp=-1066.7570,349.5940,11.2630
def=-1085.2926,331.3790,11.2630
att=482.0498,835.1406,25.5501
name=Phil's place
[7]
cp=-988.8309,263.8112,8.8125
def=-959.3351,267.9018,11.2630
att=482.0498,835.1406,25.5501
name=Printer near taxis
[8]
cp=-1188.9954,74.7693,11.1281
def=-1168.4934,85.5627,11.1279
att=482.0498,835.1406,25.5501
name=Haitian Drugbase
[9]
cp=-597.7075,634.2572,11.6765
def=-597.6194,657.0229,11.0739
att=482.0498,835.1406,25.5501
name=Biker Bar
[10]
cp=-562.0619,699.9868,20.7011
def=-588.0886,712.8249,20.5550
att=482.0498,835.1406,25.5501
name=Skumole Shack
[11]
cp=-568.9291,787.7806,22.8768
def=-567.8622,785.5654,22.8768
att=482.0498,835.1406,25.5501
name=Lower Office Building
[12]
cp=77.3401,1103.0327,32.6039
def=74.0175,1073.6988,15.3328
att=482.0498,835.1406,25.5501
name=Prawn Mansion
[13]
cp=-91.2452,932.5880,10.8337
def=-60.0477,936.3361,10.9401
att=482.0498,835.1406,25.5501
name=Film Studios
[14]
cp=558.8398,17.6127,52.7511
def=552.4447,-3.3015,14.3036
att=482.0498,835.1406,25.5501
name=WK Chariots Hotel
[15]
cp=230.3209,-1264.7224,20.1123
def=218.7902,-1285.2108,12.0829
att=482.0498,835.1406,25.5501
name=Ocean View Hotel
[16]
cp=114.3444,-1226.5134,24.5424
def=144.4494,-1224.7324,24.5424
att=482.0498,835.1406,25.5501
name=Carpark 2
[17]
cp=63.2068,-1449.0851,10.5656
def=82.0413,-1457.6528,11.6068
att=482.0498,835.1406,25.5501
name=Stripclub
[18]
cp=-1697.9498,-182.1340,23.8613
def=-1712.9678,-184.1474,14.8683
att=482.0498,835.1406,25.5501
name=Army
[19]
cp=-1440.1986,-883.8117,20.8979
def=-1440.1860,-883.6504,20.8979
att=482.0498,835.1406,25.5501
name=Airport
[20]
cp=-1192.3033,-1351.3890,11.4304
def=-1195.7324,-1328.7297,14.9360
att=482.0498,835.1406,25.5501
name=Airport Jetty
[21]
cp=-890.3447,-524.9782,29.2181
def=-913.7552,-559.6531,14.5553
att=482.0498,835.1406,25.5501
name=Cherry Poppers
[22]
cp=-663.1713,-1476.4097,13.8016
def=-684.4316,-1467.2001,11.8480
att=482.0498,835.1406,25.5501
name=Dock
[23]
cp=-1111.4783,-182.0833,23.0943
def=-1065.9365,-253.5378,18.1968
att=482.0498,835.1406,25.5501
name=Printworks
[24]
cp=-1262.6262,143.5957,26.5652
def=-1306.7770,170.5839,11.4814
att=482.0498,835.1406,25.5501
name=Junkyard
[25]
cp=-378.6839,-597.8572,9.9623
def=-378.5836,-598.4525,9.9623
att=482.0498,835.1406,25.5501
name=Vercetti Mansion Back
[26]
cp=-1116.7987,-606.7387,26.0573
def=-1122.4690,-659.9838,16.2525
att=482.0498,835.1406,25.5501
name=Robinas Cafe
[27]
cp=-694.9564,-1219.5049,16.3084
def=-678.5285,-1252.9448,35.2674
att=482.0498,835.1406,25.5501
name=Sailor Ship
[28]
cp=-847.0101,-71.5965,11.5386
def=-851.5379,-92.6048,11.1033
att=482.0498,835.1406,25.5501
name=Pharmacy
[29]
cp=-1046.6473,-516.2407,20.2994
def=-1046.6473,-516.2407,20.2994
att=482.0498,835.1406,25.5501
name=Rooftops Near CherryPoppers
[30]
cp=-975.7707,-830.8890,6.8009
def=-975.7707,-830.8890,6.8009
att=482.0498,835.1406,25.5501
name=Sunshine Autos
[31]
def=-664.5581,-1637.6881,18.5661
cp=-678.7174,-1631.8532,20.9614
att=-809.1567,1261.5865,24.7142
name=Far Ship
[32]
def=607.8477,-225.6814,13.8289
cp=623.9960,-267.4936,13.8289
name=Beach Resort
att=482.7106,835.3045,25.5501
[33]
cp=-274.7500,-300.4642,10.2977
def=-270.2983,-343.7532,11.0799
name=Starfish Mansion
att=482.0498,835.8213,25.5501
[34]
def=510.1350,-99.9183,10.5468
cp=464.6095,-54.3270,15.7037
name=Malibu
att=481.5668,835.6203,25.5501
int=17
[/spoiler]
error :
AN ERROR HAS OCCURED [parameter 1 has an invalid type 'null' ; expected: 'string']

CALLSTACK
*FUNCTION [GetTok()] functions.nut line [602]
*FUNCTION [LoadPickups()] functions.nut line [23]
*FUNCTION [onScriptLoad()] Main.nut line [56]

LOCALS
[m] 1
[vargv] ARRAY
[n] 1
[separator] ","
[string] NULL
[this] TABLE
0
[this] TABLE
[this] TABLE
function GetTok(string, separator, n, ...)
{
   line 602 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;
}
line 23 in loadpickups            y = (GetTok(Bases.CP, ",", 2)).tofloat(),
line 57    LoadPickups();
and one more error input line too long in ini (176)
#2
Scripting and Server Management / crouch
Oct 17, 2015, 07:04 AM
how to disable crouch when a player crouched and tried to fire?
#3
error is still  coming @Mashreq help plaese
#4
doesnt works
removed try catch
prob is continueing
line 305 :    local add = cash + amount.tointeger();
line 1335 :     IncCash(player,5000)
line 422 :       else Register(player,text)
#5
Scripting and Server Management / arith op
Oct 16, 2015, 07:50 AM
hello guys plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz help me there is a problem
reg function error : arith op + between "null" and "integer" plzzzzzzzzzzzzzzz help help help
code :
function Register( player, password )
{
     try{
local pass = SHA256(password);
QuerySQL( db, "INSERT INTO Account ( Name, UID, Level, Pass, Cash, Kills, Deaths ) VALUES ( '" + player.Name.tolower() + "', '" + player.UniqueID + "', '1', '" + pass + "', '0', '0', '0' )" );
status[ player.ID ].IsLogged = true;
status[ player.ID ].IsReg = true;
  local q = QuerySQL(db,"SELECT Cash FROM Accounts WHERE Name='"+player.Name+"'")
  status[player.ID].Cash=GetSQLColumnData(q,0)
  status[player.ID].Kills=GetSQLColumnData(q,1)
  status[player.ID].Deaths=GetSQLColumnData(q,2)
IncCash(player,5000)
ServerMessage( "You've successfully registered with the password " + password, player );
}
catch(e) print( "Reg Function Error: " + e );
}
error on inccash i give :
function IncCash( player, amount )
{
      local cash = status[ player.ID ].Cash;
  local add = cash + amount;
  status[ player.ID ].Cash = add;
  player.Cash = add;
}
#6
Scripting and Server Management / Re: null
Oct 16, 2015, 07:47 AM
fixed myself
#7
Scripting and Server Management / null
Oct 15, 2015, 02:13 PM
error is trying to set null accinfo!
function AccInfo( player )
{
      try{
  local id = player.ID;
  local ip = player.UniqueID;
  if ( GetLevel( player ) >= 1 )
  {
      if ( ip != GetUID( player ) )
  {
              aMessage("[#ffffff]Welcome back! Type /login to login.",player);
  status[ player.ID ].IsReg = true;
  status[ player.ID ].IsLogged = false;
  }
  else if ( ip == GetUID( player ) )
  {
             status[ player.ID ].IsReg = true;
  status[ player.ID ].IsLogged = true;
  aMessage("Welcome back! You're auto-logged in.",player);
  }
 
  }
  else
  {
    aMessage("You're not registered, Please type /register <password> in order to play.",player);
  }
  }
  catch(e) print( "AccInfo Error: " + e );
}
i hv function aMessage and other things created!!
help plzz
#8
Scripting and Server Management / Re: Error
Oct 15, 2015, 08:45 AM
not works :(
help please
i get this error whenever i use "ActivateEcho()"
#9
Scripting and Server Management / Error
Oct 15, 2015, 07:17 AM
AN ERROR HAS OCCURED [the index 'slice' does not exist]

CALLSTACK
*FUNCTION [FBSSortNicks()] scripts/Bot.nut line [716]
*FUNCTION [FBSProcess1()] scripts/Bot.nut line [164]
why error is coming?
function FBSSortNicks( szList )
{
local a = NumTok( szList, " " );
local NickList = GetTok( szList, " ", 6, a ), i = 1;

FBS_NICKS <- array( 50, null );

while( GetTok( NickList, " ", i ) != "366" )
{
line 716 local levelnick = GetTok( NickList, " ", i ), nick = levelnick.slice( 1 ), level = levelnick.slice( 0, 1 );

if ( level == ":" ) AddNewNick(nick,1)
else if ( level == "+" ) AddNewNick( nick, 2 );
else if ( level == "%" ) AddNewNick( nick, 3 );
else if ( level == "@" ) AddNewNick( nick, 4 );
else if ( level == "&" ) AddNewNick( nick, 5 );
else if ( level == "~" ) AddNewNick( nick, 6 );
else AddNewNick( nick, 1 );
i ++;
}
}
function FBSProcess1( sz )
{
  local raw = split( sz, "\r\n" ), a, z = raw.len(), line;

for ( a = 0; a < z; a++ )
{
line = raw[ a ];

local FBS_PING = GetTok( line, " ", 1 ), FBS_EVENT = GetTok( line, " ", 2 ), FBS_CHANEVENT = GetTok( line, " ", 3 ),
Count = NumTok( line, " " ), Nick, Command, Prefix, Text;

if ( FBS_PING == "PING" ) EchoBots[1].Send( "PONG " + FBS_PING + "\n" );

if ( FBS_EVENT == "001" )
{
if ( EchoBots[1] )
{
EchoBots[1].Send( "PRIVMSG NickServ :IDENTIFY " + FBS_BPASS + "\n" );
EchoBots[1].Send( "MODE " + BotNames[1] + " +B\n" );
EchoBots[1].Send( "JOIN " + FBS_CHAN + " " + FBS_CPASS + "\n" );
}
}
line 164 else if ( FBS_EVENT == "353" ) FBSSortNicks( sz );
else if ( ( FBS_EVENT == "MODE" ) || ( FBS_EVENT == "NICK" ) || ( FBS_EVENT == "JOIN" ) || ( FBS_EVENT == "PART" ) || ( FBS_EVENT == "QUIT" ) ) EchoBots[1].Send( "NAMES :" + FBS_CHAN + "\n" );
}
}
fix pllllzzzz
#10
how to make custom vehicle acceleration and speed fast!
i tried in my .xml file but the speed and acceleration is same :((
#11
i want it for commands spam!!!!
[player.ID] will not work i think on bot!!!!!
i use fbs!!!!!!
help!!!!!!!
please!!!!!!!!!!!!!
thanks!!!!!!!
#12
Scripting and Server Management / anitspammer
Sep 24, 2015, 03:57 AM
hello guys how to create IRC bot anti spammer i have no idea how to please tell  me
#13
Support / Not updating
Sep 05, 2015, 07:40 AM
I searched all the forum and tried everything, still error :-
Version used by server is not installed and failed to download.
#14
hello guys this is my code
else if(txt3[0].tolower() == "noob")
{
Message( "[#ffee00]Auto kicked "+player.Name+" for saying bad words.");
EchoMessage( ICOL_RED + "[" + player.ID + "] " + player.Name + " left the Server. (Kicked due to abusing.)" );
KickPlayer( player );
}
and whenever I type these words it kicks me but when i type word like hello noob it doesn't kicks please tell me how to make it like that
#15
@Doom_Killer thanks if any error comes again, i will tell you :)
and how to edit "Z" courd.