small help!!

Started by Abbas_905, Jul 14, 2024, 01:43 AM

Previous topic - Next topic

Abbas_905

Hello Everyone
I want your smalll help,
need adminmod,apark command for admins

Phantom

Quote from: Abbas_905 on Jul 14, 2024, 01:43 AMHello Everyone
I want your smalll help,
need adminmod,apark command for admins
can you be a bit more specific about what you ACTUALLY need?

Luis_Labarca

Quote from: Abbas_905 on Jul 14, 2024, 01:43 AMHello Everyone
I want your smalll help,
need adminmod,apark command for admins

Hello bro, I don't know if you are looking for a cmd to park vehicles.

I use this on my server, I adjust the vehicle to my liking, then I save, I hope it works for you, I tried it before passing it on and it works fine.


else if ( cmd == "apark"||  cmd == "setpark")
{
if ( !text ) MessagePlayer("Usage: /"+cmd+" [V/ID] ", player );
else {
local ve = GetVehicle( GetTok( text, " ", 1 ) );
if ( !ve ) MessagePlayer( "Vehicle id invalid.", player );
else {

local x = ve.Pos.x.tointeger(),y = ve.Pos.y.tointeger(),z = ve.Pos.z.tointeger();
ve.SpawnPos = Vector(x,y,z);
ve.EulerSpawnAngle = Vector(ve.EulerAngle.x,ve.EulerAngle.y,ve.EulerAngle.z)
MessagePlayer( "Vehicle Pos Saved : PosX "+ve.Pos.x+",PosY "+ve.Pos.y+",PosZ "+ve.Pos.z+", AngleX "+ve.EulerAngle.x+",AngleY "+ve.EulerAngle.y+",AngleZ "+ve.EulerAngle.z, player );

//These two lines are to save in the database but remember that you must modify it to your data for it to work
//QuerySQL( DatabaseVehicle, "UPDATE Vehicle SET PosX='"+x+"',PosY='"+y+"',PosZ='"+z+"' WHERE rowid LIKE '" + ve.ID + "'" );
///QuerySQL( DatabaseVehicle, "UPDATE Vehicle SET AngX='"+ve.EulerAngle.x+"',AngY='"+ve.EulerAngle.y+"',AngZ='"+ve.EulerAngle.z+"' WHERE rowid LIKE '" + ve.ID + "'" );
}
}
}




My server RP
IP: 51.222.28.159:8194