Jump to content

Serials


Wei

Recommended Posts

Posted

So... I'm making a ban system. Depends on what could I put banned serials/IPs. In xml or how ?

I wanna make it on command not to add it in script.

Diet with russian vodka, lose 3 days in one week !

Posted

You can do it MySQL/SQLite/XML based.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

how can I make it XML based what I put as value of node or how ?

Diet with russian vodka, lose 3 days in one week !

Posted

Check the XML functions, start reading about how it works, do test scripts, then you can proceed with a bigger one.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
executeSQLCreateTable( "banList", "playerIP TEXT" ) 
  
function saveData(source) 
executeSQLQuery( "UPDATE banList SET "..getPlayerIP(source).." WHERE playerIP" ) 
end 
addCommandHandler("set", saveData) 

what am I doing wrong ?

Diet with russian vodka, lose 3 days in one week !

Posted
executeSQLCreateTable( "banList", "playerIP TEXT" ) 
  
function saveData(source) 
executeSQLQuery( "UPDATE banList SET playerIP = '".. getPlayerIP ( source ) .."' WHERE playerIP = '".. getPlayerIP ( source ) .."'" ) 
end 
addCommandHandler("set", saveData) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
executeSQLQuery( "INSERT INTO banList playerIP VALUES '".. getPlayerIP ( source ) .."'" ) 

syntax error. Sorry but it's my first time doing with this.

Diet with russian vodka, lose 3 days in one week !

Posted

Try this:

executeSQLQuery( "INSERT INTO banList (playerIP) VALUES (".. getPlayerIP ( source ) ..")" ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
executeSQLCreateTable( "banList", "players, playerIP TEXT" ) 
  
function saveData(source) 
executeSQLInsert ( "banList", "'"..getPlayerName(source).."', '" .. sourcename .. "'" ) 
end 
addCommandHandler("set", saveData) 
  
function exeData(source) 
ip = executeSQLSelect ( "banList", "'"..getPlayerName(source).."', 'playerIP' ") 
outputChatBox( tostring(ip) ) 
end 
addCommandHandler("get", exeData) 

why it returns table ?

Diet with russian vodka, lose 3 days in one week !

Posted
executeSQLCreateTable( "banList", "players, playerIP TEXT" ) 
  
function saveData ( source ) 
    executeSQLInsert ( "banList", "'"..getPlayerName(source).."', '" .. sourcename .. "'" ) 
end 
addCommandHandler("set", saveData) 
  
function exeData ( source ) 
    result = executeSQLSelect ( "banList", "playerIP", "players = '" .. getPlayerName(source) .. "'" ) 
    outputChatBox( tostring ( result [ 1 ] [ "playerIP" ] ) ) 
end 
addCommandHandler("get", exeData) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...