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 - Mohamed Boubekri

#16
Thank you.
#17
Quote from: Mohamed Boubekri on Aug 11, 2023, 04:11 PM
Quote from: habi on Aug 11, 2023, 03:39 PMI will help but do not have computer atm. Let me reach home


PS: Did tou tried SetCinematicBorder(true) ?
Hey, thank you for your reply, no i didn't try that & i don't think its represent the problem.
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.0
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.
I hadn't understand how i can load .nut file from sqmod.ini as compile.

How i can load .nut file from sqmod.ini as compile ?
#18
Hey everyone, i want to make a system, which will prevent car from moving when no one is driving it.
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 ?
I get error here
if (newX && newY && newZ && !player.Vehicle)  player dosen't defined.
#19
Hey @Peppo, thanks for telling me, now links are fixed.
About dynamic things, can you clarify more ?
#20
The project has been improved 'lag', now is more slight, and some minor errors have been corrected.
Character area also updated. Added create character 'png' instead of button.
#21
Community Plugins / Re: Plugin development
Sep 05, 2023, 07:08 AM
Perfect, this tutorial will be very usefull !
#22
You need to explain more about your problem, and show us your onplayerdeath & onplayerpart functions.
#23
Hey @Nihongo^, you can specify an array or a status, which will vary depending on the number of presses.
Here is an example: (untested)
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();
}
#24
Create it by yourself, i already give you an idea.

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.
#25
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.
Add this:
if (!target) return;before that line:
if(target.World == 1) return true;
#26
-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.
#27
Okey, thank you for your reply.
#28
Hey everyone, i'm wondering if i can freeze the mouse instead of hiding it ? GUI.SetMouseEnabled(false);
Because, if we don't freeze it, the player can show the mouse again by clicking Alt Gr. Then the player can
cause errors in the console, for example if he click a button again & again.
#29
I had doubts about this. Most importantly, thank you for the clarification.
#30
Hey everyone, i get the following error in the console when i shutdown my server CTRL + C
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 FreeSQLQuery
local 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