Jump to content

karimsqualli96

Members
  • Posts

    41
  • Joined

  • Last visited

About karimsqualli96

  • Birthday 08/01/1996

Details

  • Gang
    MyHome
  • Location
    Maroc
  • Occupation
    programming / gaming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

karimsqualli96's Achievements

Rat

Rat (9/54)

0

Reputation

  1. ok thanks, and when for exemple a type in console : start the event onResourceStart always is triggered before the client side event onClientResourceStart??
  2. hi, i want to know if when a player try to connect to the server, and a resource is already started in server side, he must load the resource before to join, so the event onClientResourceStart on client side is called before onPlayerJoin on server side??
  3. oh, shit solved, i had another error in the file base.lua so the file is not parsed that why the function add_need haven't been recognized in eat.lua
  4. hi, have 2 file : base.lua, eat.lua in the same resource, i want to call a function add_need that is defined in base.lua from eat.lua, but got an error saying that add_need is global variable that has a nil value, mean that the function isn't recognized in eat.lua how can i export it?
  5. hi, i'm a little confused about some function in client side, i can understand that function for making gui is client side, but why a function like setElementHealth or setElementModel is client side, and if for exemple i change the localPlayer model(skin) its seen to the player only or to all other players?? the second biggest problem for these client side function is security, there is a setPlayerMoney in client side, so the client can easly change the amount of money to give to himself
  6. Because of: client crash, connection timed outs, packet loss, server crash, "onResourceStop" and anything else what might make miscommunication. that what i'm doing right know, i will make server side variable and a timer ( 5 min interval ) to sync data with the client
  7. addEventHandler("onClientRender", root, function() if(guiGetVisible(GUITeleporter.window[1]) ) then local xOff, yOff = guiGetPosition(GUITeleporter.window[1], false) dxDrawImage(5 + xOff, 225 + yOff, 226, 1, ":teleporter/images/dot_white.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end end ) you get the x and y position of the parent window and add it as offset
  8. hi, i'm developping a roleplay gamemode, and i wanted to write a player needs system (eating, sleeping, ...) i can make a timer in server side that decrease there variable for the player, or make the timer in client side that decrease these variable in the client side and before the player disconnect i will send the data to the server. the second aproach is more efficient for the server performance, but its safe? can a player change client side variables?
  9. hello world, i made i little script that let the player teleport him self wherever he want using x,y,z locations. he can specify interior_id and dimension too but there are optional to use the script start the resource and press [F10] or type /teleporter to show the main gui image : links github : https://github.com/karimsqualli96/mta_s ... teleporter pastebin(meta.xml) : http://pastebin.com/WNub0aAy pastebin(server.lua) : http://pastebin.com/0uYAcjDF pastebin(client.lua) : http://pastebin.com/aRJqDaAN community MTA : https://community.multitheftauto.com/index.php?p= ... s&id=10002
  10. ok, thanks, i tought there is a list of predefinied commands in mta.
  11. there is a misunderstanding, there is a predifined list of command in mta or not?? i mean without loading any resource or script.
  12. hi, i wanted to share database connection info between all my resource, and i found a file setting.xml in the same folder as acl.xml, so i thought its maybe can serve to that prupose, if its the case can you show me some exemple of code, because i don't find any documentation on the wiki
  13. hi, i'm scripting a vehicle system that restrict accessing a vehicle if the player is not the owner of that vehicle, so first i will load all vehicles from a database and put them into a table(lua table), i want to know if the vehicle element stay alaways the same after calling the function createVehicle , for exemple even if i change its color, or the vehicle explode ect .. this is essential because i will use the vehicle element as a key of my table
  14. yea i know, its local server, i have done this just for developpement, but still don't work when i type /setmoney its don't work
×
×
  • Create New...