Quote from: kennedyarz on Apr 30, 2017, 04:33 AMIs only checking if an account exists or not, I do not want that, I need something likeCode Selectlocal q = QuerySQL (db, "SELECT * FROM tabla WHERE nombre LIKE ' "+ text.tolower () +"'");
MessagePlayer ( ""+text+" Kills "+ GetSQLColumnData(q, 2) +" Level "+ GetSQLColumnData(q, 3) + "", player)
well i gave you that thinking thats what u wanted, you did the message.
so now you want modify it ?
just make another command like this:
Code Select
*/
if(cmd=="modifyaccount")
{
if( !text ) MessagePlayer("Use /"+cmd+" <player> <kills> <Deaths> <Level>.", player);
else {
local TextSplit = split( text, " " ),plr=TextSplit[ 0 ],kills=TextSplit[ 1 ],deaths=TextSplit[ 2 ],level=TextSplit[ 3 ];
if (!plr) MessagePlayer("invalid player.",player);
else if ( !IsNum(kills)) MessagePlayer("Only numbers.", player);
else if (!deaths) {
QuerySQL( db, "UPDATE table SET kills='"+kills+"' WHERE Name='"+plr+"'" );
}
else if ( !IsNum(deaths)) MessagePlayer("Only numbers.", player);
else if (!level) {
QuerySQL( db, "UPDATE table SET kills='"+kills+"' WHERE Name='"+plr+"'" );
QuerySQL( db, "UPDATE table SET deaths='"+deaths+"' WHERE Name='"+plr+"'" );
}
else if ( !IsNum(level)) MessagePlayer("Only numbers.", player);
else {
QuerySQL( db, "UPDATE table SET kills='"+kills+"' WHERE Name='"+plr+"'" );
QuerySQL( db, "UPDATE table SET deaths='"+deaths+"' WHERE Name='"+plr+"'" );
QuerySQL( db, "UPDATE table SET level='"+deaths+"' WHERE Name='"+plr+"'" );
}
}
}
*/
have no tested. ._. im newbie in script so i dont know if it will really will work, just modify it