Jump to content
  • 0

how to Add SQL command in script?


Onairda

Question


  • Group:  Members
  • Topic Count:  71
  • Topics Per Day:  0.03
  • Content Count:  167
  • Reputation:   8
  • Joined:  12/30/16
  • Last Seen:  

Hi please i need some help, what is the code to connect my Script into my Database table . here is my script please help .
ready also the script this is very basic :)
 

-	script	test	1,{
OnPCLoginEvent:
if( !#Verification ){
mes "Input Verification Code:";
input .@verificationcode; //This the Player Input Where he/she will input the Code that we given 

if( .@verification != my SqL Database ) //then this is the Tracking area where i want to connect this script to my Database  if the inputed verificationcode is not equal in the code on my database the player will be kicked :)
{
mes"Sorry you Inputed a Code That is not List in our Database";
next;
atcommand "@kick" Player // the player will be kick
}
}
else
{
set #Verification,1; //meaning if this is set to 1 this will not pop up again when they are logging in
mes "Welcome to the Server :)";
close;
}


}

 

Edited by G-RO
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

doc/script_commands.txt#L7847

query_sql( "INSERT INTO `table` ( `column1`,`column2`,`column3` ) VALUES ( 1,2,3 ) " );

etc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...