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.

Messages - AroliS^
46
Off-Topic General / Re: Help! - VCMP Crash:
« on February 2nd, 2019, 08:36 PM »
intenta cambiando los permisos, i mean ejecutalo como administrador y si no funciona cambia la compatibilidad desde propiedades, click derecho y  / propiedades / compatibilidad y prueba con windows xp services pack 3..
47
Snippet Showroom / Re: Simple spectate system by Eros
« on February 2nd, 2019, 06:13 PM »
I found some bugs but i fixed it up now newtimers are working great!
48
Snippet Showroom / Re: Simple spectate system by Eros
« on February 2nd, 2019, 01:50 AM »
fixed thanks !
49
Support / Re: onPlayerChat
« on January 28th, 2019, 11:00 PM »
simple as that xDD solved thanks!
50
Snippet Showroom / Simple spectate system by Eros
« on January 28th, 2019, 10:43 PM »
Everything is explained on scripts.

i maked Newtimer for it but i did n't test if you want spectate system with newtimer try it but if you don't wanna just live it like that.

onScriptLoad()
Code: [Select]
spec <- false;

playerspawn
Code: [Select]
player.SpectateTarget = null;

playerClass
Code: [Select]
spec      = false;

spectate cmd
Code: [Select]
else if ( cmd == "spectate" )
{
local id = player.ID;
if ( player.Vehicle ) ::MessagePlayer( E + "You can't use this commnad using a vehicle.",player)
else if ( !text ) ::MessagePlayer(C + EROS + cmd + " <plr/off> ", player );
else if (text=="off")
{
//delete those thing & change it for newtimer(specoff)
if ( pstatus[id].spec == false )
{MessagePlayer( "You are not in spectate mode.", player );}
else if ( pstatus[id].spec == true )
{::DM( "You left specate mode.", player );}
pstatus[id].spec = false;
spec = false;
player.SpectateTarget = false;
player.IsFrozen = false;
player.Immunity = ( 0 );
//delete those thing & change it for newtimer(specoff)
}
else
{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) ::MessagePlayer(E + "Invalid Player.", player );
else if ( plr.ID == id ) ::MessagePlayer( E + "You can not use spec on you.", player );
else if ( !plr.IsSpawned ) ::MessagePlayer( E + plr.Name + " has to choose a skin fisrt.", player );
else
{
//delete those thing & change it for newtimer(specon)
::DM(  ""+orange+"[SPEC] "+ white +" You are spectating to " + purple + plr.Name + white + " ID: " + id + " :: to exit use /spectate off",player );
player.Immunity = ( 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 32 | 64 | 128 );
pstatus[player.ID].spec = true;
spec = true;
player.SpectateTarget = plr;
//delete those thing & change it for newtimer(specon)
}
}
return 0;
}

the cmd work even without this, i added this just if you want the cmd with timer :3
Newtimers are not tested

place it on cmd
Code: [Select]
NewTimer( "specoff", 3000, 1, player.ID );
::MessagePlayer( "[#cccccc]wait 3 secs", player );
place it on function.nut
Code: [Select]
function specoff( player )
{
try
{
player = FindPlayer( player );
if ( player )
{
if ( pstatus[ player.ID ].spec == false )
{MessagePlayer( "You are not in spectate mode.", player );}
else if ( pstatus[ player.ID ].spec == true )
{::DM( "You left specate mode.", player );}
pstatus[player.ID].spec = false;
spec = false;
player.SpectateTarget = false;
player.IsFrozen = false;
player.Immunity = ( 0 );
}
}
catch(e)
MessagePlayer("error "+e,player)
}

specon function
place it on cmd
Code: [Select]
NewTimer( "specon", 3000, 1, player.ID, plr.ID );
::MessagePlayer( "[#cccccc]wait 3 secs", player );
player.IsFrozen = true;
place it on function.nut
Code: [Select]
function specon( player, plr )
{
try
{
player = FindPlayer( player );
plr = FindPlayer( plr );
if ( player )
{
if( plr )
::DM(  ""+orange+"[SPEC] "+ white +" You are spectating to " + purple + plr.Name + white + " ID: " + plr.ID + " :: to exit use /spectate off",player );
player.Immunity = ( 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 32 | 64 | 128 );
pstatus[player.ID].spec = true;
spec = true;
player.IsFrozen = true;
player.SpectateTarget = plr;
}
}
catch(e) ::MessagePlayer("error "+e,player)
}
51
Support / Re: onPlayerChat
« on January 28th, 2019, 08:26 PM »
this is the first screenshot



the second one

52
Support / onPlayerChat
« on January 28th, 2019, 05:18 AM »
this is my rChat i want that when one player is in wolrd 2 show this one



but is replying 2 times, what can i do with it??

53
Support / Re: setpass help!!
« on January 19th, 2019, 04:04 PM »
solved thanks!!
54
Support / setpass help!!
« on January 19th, 2019, 03:22 AM »
Code: [Select]
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 

Code: [Select]
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   


55
Snippet Showroom / Spawnloc system
« on November 18th, 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()
(click to show/hide)
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) )" );

function onPlayerCommand(player, command, arguments)
(click to show/hide)
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 );
}
}


function onPlayerSpawn(player)
(click to show/hide)
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);
 }
56
Support / Re: Connection problem
« on November 16th, 2018, 06:03 PM »
It is just in one specific server? or happen in each server that you trying to join in?
57
Support / Re: PlayerClass and SQLQuery problem
« on November 12th, 2018, 01:34 AM »
it is working, thank u so much to you guys xd :D
58
Support / Re: PlayerClass and SQLQuery problem
« on November 11th, 2018, 05:44 PM »
this is what i have in my playerspawn



Motley i else have just two and it doesnt work!!
59
Bug Reports / lan problem
« on November 11th, 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 :(
60
Support / Re: PlayerClass and SQLQuery problem
« on November 11th, 2018, 05:23 AM »
same problem, playerclass isn't recognized