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 - CopyPaste

#1
Exactly , that was what I want thanks   :)

and sorry slc im noob at scripting please don't read my topics :(
#2
Please help me how to fix  i changed that line to
if ( !IsNum( a[0] ) || !text( a[1] )) MessagePlayer( "Format: /kick <id> <reason>", player );
     
#3
>.< It is kickplayer not working
#4
if ( cmd == "kick" )
    {
      if ( !text ) MessagePlayer( "Correct syntax : /kick <id> <reason>", player );
      else if ( split(text, " ").len() < 2) return MessagePlayer("Correct syntax : /kick <id> <reason>", player )
      else
   {
   local a = split(text, " "), plr = FindPlayer( text.tointeger() ), player = FindPlayer( text.tointeger() );
if ( !IsNum( a[0] ) || text( a[1] )) MessagePlayer( "Format: /kick <id> <reason>", player );
      else {
  KickPlayer( a[0].tointeger() );
  Message( "Format: /kick <"+a[0]+"> <"+a[1]">" );
  }
      }
   }

Error : Attempt to call String
#5
Lol, Thanks it works :)
#6
Same error in parameter and my player teleports to gulf
#7
Doom , with float and without float  when i type /gotoloc im going to gulf area no matter what loc i type i will go to gulf
#8
Thanks XD its working but why goto loc not working
local q =  ::mysql_query( sqliteDB, "SELECT x, y, z, Creator FROM Gotoloc WHERE Name = '"+ escapeSQLString( text ) +"'" );
 
          if (mysql_num_fields(q,0) != null)
          {
                local x = mysql_num_fields(q,0).tofloat(), y = mysql_num_fields(q,1).tofloat(), z = mysql_num_fields(q,2).tofloat(), Creator = mysql_num_fields(q,3);
player.Pos = Vector( x.tofloat(), y.tofloat(), z.tofloat() );
MessagePlayer( "Syntax Error! You teleported to "+ escapeSQLString( text ) +" "+ x.tofloat" "y.tofloat()""z.tofloat()"", player );
          }
#9
          local q =  ::mysql_query( sqliteDB, "SELECT x, y, z, Creator FROM Gotoloc WHERE Name = '"+ escapeSQLString( text ) +"'" );

          if (mysql_num_fields(q,0) != null)
          {
                local x = mysql_num_fields(q,0), y = mysql_num_fields(q,1), z = mysql_num_fields(q,2), Creator = mysql_num_fields(q,3);
player.Pos = Vector( x, y, z );
          }

when i type /gotoloc savedloc  im going to golf area and


    mysql_query( sqliteDB, "INSERT INTO Gotoloc (Name, x, y, z, Creator)  VALUES('" + escapeSQLString( text ) + "', '" + player.Pos.x.tofloat() + "', '" + player.Pos.y.tofloat() + "', '" + player.Pos.z.tofloat() + "', '" + player.Name + "')" );    why don't float work here
#10
Doom Killer i already removed that
mysql_query( sqliteDB, "INSERT INTO Gotoloc (Name, x, y, z, Creator)  VALUES('" + text + "', '" + player.Pos.x + "', '" + player.Pos.y + "', '" + player.Pos.z + "', '" + player.Name + "'" );
// Ok i will use yours for security purpose

mysql_query( sqliteDB, "INSERT INTO Gotoloc (Name, x, y, z, Creator)  VALUES('" + escapeSQLString( text ) + "', '" + player.Pos.x + "', '" + player.Pos.y + "', '" + player.Pos.z + "', '" + player.Name + "'" );

now it works i did a mistake at last  + player.Name + "')"
#11
Thanks Thijn ,  it is working now but it is not saving in database

This is my database
CREATE TABLE Gotoloc( Name VARCHAR(32), x INT, y INT, z INT, Creator VARCHAR(25) )

#12
Error in mysql_query wrong number of arguments
sqliteDB <- mysql_connect( "localhost", "root", "fenkyou", "notwork" );  // on scriptload

if( cmd == "saveloc" ){

sqliteDB <- mysql_query( sqliteDB, "INSERT INTO Gotoloc (Name, x, y, z, Creator)  VALUES('" + text + "', '" + player.Pos.x + "', '" + player.Pos.y + "', '" + player.Pos.z + "', '" + player.Name + "'" );

}


I type /saveloc mansion im getting error