Thank you.
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 MenuQuote from: Mohamed Boubekri on Aug 11, 2023, 04:11 PMHow i can load .nut file from sqmod.ini as compile ?Quote from: habi on Aug 11, 2023, 03:39 PMI will help but do not have computer atm. Let me reach homeHey, thank you for your reply, no i didn't try that & i don't think its represent the problem.
PS: Did tou tried SetCinematicBorder(true) ?
Xmair told me that i need to make my own class system to skip THE MESSAGE.
I have seen DizzasTeR Class system but i hadn't understand somethings like that:-Quote from: Mohamed Boubekri on Jul 15, 2023, 07:35 PMHey everyone, i have seen the post of @DizzasTeR: https://forum.vc-mp.org/?topic=7600.0I hadn't understand how i can load .nut file from sqmod.ini as compile.
but he told us something that i dosen't understand it
"You can place this code inside a spawnselector.nut file and just load it from sqmod.ini as Compile"
I hadn't understand how i can load .nut file from sqmod.ini as compile.
function onVehicleMove( vehicle, lastX, lastY, lastZ, newX, newY, newZ )
{
if (newX && newY && newZ && !player.Vehicle)
{
vehicle.Pos.x = lastX, vehicle.Pos.y = lastY, vehicle.Pos.z = lastZ;
}
else return;
}
The problem is, that function 'onVehicleMove' does not contain 'player', so how i can detect the player ?if (newX && newY && newZ && !player.Vehicle)
player dosen't defined.
J <- BindKey(true, 0x4A, 0, 0);
class TESTO
{
press = 1;
}
function onScriptLoad()
{
status <- array ( GetMaxPlayers(), null );
}
function onPlayerJoin( player )
{
status[player.ID] = TESTO();
}
function onKeyDown( player, key )
{
if( key == J ) // jump or boost key
{
if ( status[player.ID].press < 5 )
{
if (!player.Vehicle) return;
status[ player.ID ].press += 1;
local vPos = player.Vehicle.Pos;
vPos.z = vPos.z * 1.5;
}
else
{
MessagePlayer("You can't use jump button above 4 times, please wait 5 seconds !",player); //after 5 seconds, player will be able to use that key again
gta <- NewTimer("reset",5000,1,player.ID);
}
}
return;
}
function reset(p)
{
p = FindPlayer(p);
status[p.ID].press = 1;
gta.Stop();
gta.Delete();
}
Quote from: Mohamed Boubekri on Aug 19, 2023, 05:49 PM-Try to detect if player is on spectating mode, i mean like a status, then add that line:
Example: if ( status[player.ID].Spec == true ) return player.SpectateTarget = false;
And again try to define the target: player.SpectateTarget = target;
-Also you can hold the target in array, then try to refresh the spectate system after player world changed.
Quote from: Nihongo^ on Aug 19, 2023, 05:51 PMOne of my friend help me with this but it gives error by saying "world doesn't exists"This error appears, if the defined player doesen't exist.
if (!target) return;
before that line: if(target.World == 1) return true;
AN ERROR HAS OCCURED [unable to close due to unfinalized statements or unfinished backups]
CALLSTACK
*FUNCTION [onScriptUnload()] scripts/server-side.nut line [30]
LOCALS
[this] TABLE
[WARNING] onScriptUnload failed to execute -- check the console for more details.
That line which represent line [30]DisconnectSQL( db );
Actually i think that i need to make database free after i use it, by using FreeSQLQuerylocal p = QuerySQL(db, INSERT......); FreeSQLQuery(p);
Is that right ? if not then which is responsable for that error ? unable to close due to unfinalized statements or unfinished backups