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 - AroliS^

#61
Support / setpass help!!
Jan 19, 2019, 03:22 AM
if ( cmd == "setpass" || cmd == "newpassword" )
{
if ( !text ) MessagePlayer( " /"+ cmd +" <plr> <pass>", player );
else
{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) ::MessagePlayer( "Unknown Player.", player );
else
}
local pass = GetTok( text, " ", 2);
if ( !pass ) ::MessagePlayer( cmd + " <plr> <pass>", player );
else
{
local password = SHA256( pass );
QuerySQL( db, "UPDATE Accounts SET Password='" + password + "' WHERE Name='" + plr.Name + "'" );
::MessagePlayer( "You changed " + plr.Name + " password to: " + pass, player );
::MessagePlayer( "[#FFD700]** [ADMIN][#9400D3] " + player.Name + "[#FFFFFF] change ur password: " + pass, plr );
}
return 0;
}

something is wrong when i changed someone password /login don't read sha256 passwords this is what i have on login command 

if ( SHA256(text) != GetPass( player ) ) return ::MessagePlayer( "Wrong password. [" + pstatus[ player.ID ].Warnlogg + "/3]", player );
           
the current account with yellow is how my setpass do sha256 password and the other are when players use /register + password   


#62
Snippet Showroom / Spawnloc system
Nov 18, 2018, 06:46 PM
I modify this system : https://forum.vc-mp.org/?topic=5189.msg37267#msg37267
::MSN = MessagePlayer
::SMS = MessagePlayer
::PM = MessagePlayer
EROS = "/"

onScriptLoad()
[spoiler]
locs <- ConnectSQL( "datas/locs.db" );
QuerySQL( locs, "CREATE TABLE IF NOT EXISTS spawn ( Autospawn TEXT, xaxis VARCHAR(25), yaxis VARCHAR(25), zaxis VARCHAR(25), Name VARCHAR(32) )" );
[/spoiler]

function onPlayerCommand(player, command, arguments)
[spoiler]else if ( cmd == "spawnloc" )
{
if ( check( player, null ) ) return 0;
else if ( player.Vehicle ) ::MSN( "[#cccccc]You are on a vehicle.", player );
else if ( !player.IsSpawned ) ::MSN("[#ff0000]Choose a skin before use it", player );
local q = QuerySQL( locs, "SELECT Autospawn FROM spawn WHERE Name='" + player.Name + "'");
if ( !text ) ::SMS( "/" + cmd + " <on/off>", player );
else
{
if ( text == "on" )
{
if ( GetSQLColumnData(q, 0 ) == "true" ) ::MSN( "You already did.", player );
else
{
pstatus[ player.ID ].SpawnLoc = true;
QuerySQL(locs, "UPDATE spawn SET Autospawn = 'true' WHERE Name = '" + player.Name + "'");
::PM( "Activate! to choose a place. "+azul+"Use /spawnloc set.", player );
}
}
else if ( text == "off" )
{
if ( GetSQLColumnData(q, 0 ) == "false" ) ::MSN( "You already did.", player );
else
{
pstatus[ player.ID ].SpawnLoc = false;
QuerySQL(locs, "UPDATE spawn SET Autospawn = 'false' WHERE Name = '" + player.Name + "'");
::PM( "Spawnloc desactivate!", player );
}
}
else if ( text == "set" )
{
if ( pstatus[ player.ID ].SpawnLoc == false ) ::MSN("Your spawnloc is "+azul+"[ "+ GetSQLColumnData(q, 0 ) +" ],"+blanco+" Use /spawnloc on!!.", player );
else
{
 local q = QuerySQL(locs, "SELECT * FROM spawn WHERE Name = '" + player.Name + "'");
  if(!q)
  {
   QuerySQL(locs, "INSERT INTO spawn ( Autospawn, xaxis, yaxis, zaxis, Name ) VALUES ( 'true' , '" + player.Pos.x + "' , '" + player.Pos.y + "' , '" + player.Pos.z + "', '" + player.Name + "' ) ");
  }
  else
  {
   QuerySQL(locs, "UPDATE spawn SET xaxis = '" + player.Pos.x + "' WHERE Name = '" + player.Name + "'");
   QuerySQL(locs, "UPDATE spawn SET yaxis = '" + player.Pos.y + "' WHERE Name = '" + player.Name + "'");
   QuerySQL(locs, "UPDATE spawn SET zaxis = '" + player.Pos.z + "' WHERE Name = '" + player.Name + "'");
   QuerySQL(locs, "UPDATE spawn SET Autospawn = 'true' WHERE Name = '" + player.Name + "'");
   ::PM("You are going to spawn here."+azul+" To disable it,"+blanco+" use /spawnloc", player);
}
}
}
else ::SMS( EROS + cmd + " <on/off/set>", player );
}
}[/spoiler]


function onPlayerSpawn(player)
[spoiler] local q = QuerySQL(locs, "SELECT * FROM spawn WHERE Name = '" + player.Name + "'");
 if( q && GetSQLColumnData(q, 0) == "true" )
 {
  local
  xspawn = GetSQLColumnData(q, 1).tointeger(),
  yspawn = GetSQLColumnData(q, 2).tointeger(),
  zspawn = GetSQLColumnData(q, 3).tointeger();

  player.Pos = Vector(xspawn, yspawn, zspawn);
 }[/spoiler]
#63
Support / Re: Connection problem
Nov 16, 2018, 06:03 PM
It is just in one specific server? or happen in each server that you trying to join in?
#64
it is working, thank u so much to you guys xd :D
#65
this is what i have in my playerspawn



Motley i else have just two and it doesnt work!!
#66
Bug Reports / lan problem
Nov 11, 2018, 07:34 AM
there is a big problem with lan servers, can not add it normally just appear normal server from the internet list


and in the favorite servers appears without name is something wrong with this :(
#67
same problem, playerclass isn't recognized
#68
Support / PlayerClass and SQLQuery problem
Nov 11, 2018, 04:55 AM
so, my problem is the next one, blank server.
i already maked my playerclass,
and did my first class to try it



but my playerclass is not recognized




same happened with my SQLQuery isn't recognized what can i do??
function tablescreator()
{
QuerySQL( db, blah blah)");
}