Jump to content

zixxonx

Members
  • Content Count

    57
  • Joined

  • Last visited

Community Reputation

0 Neutral

About zixxonx

  • Rank
    Snitch

Details

  • Gang
    Gang
  1. 1 is free 1 is taken by Infernus 2 is free 1 is free and again it spawns car at 1 wtfff
  2. Looks like it partially works. Now I wanted to make it that If a vehicle is in cuboid it adds +1 to the variable but it counts all the cars I have on the server So if I have 5 cuboids for 5 parking places cuboid[1] cuboid[2] cuboid[3] cuboid[4] cuboid[5] And i have something like it: (at top of the script) count = 0 local vehicles = getElementsByType("vehicle") for k,v in ipairs(vehicles)do if(isElementWithinColShape(v,cuboid[1]) or isElementWithinColShape(v,cuboid[2]) or isElementWithinColShape(v,cuboid[3]) or isElementWithinColShape(v,cuboid[4]) or isElementWithinColShape(v,
  3. Hello, I have a table with 5 cuboids: cuboid[1] = {x,y,z,10,10,10} cuboid[2] = {x,y,z,10,10,10} etc and I wanna check if there is any vehicle on these cuboids, if no then break the table i tried it for _,v in ipairs(getElementsByType('vehicle')) do outputChatBox('checking from ' .. getVehicleName(v) .. ' perspective') for i=1, 5 do if isElementWithinColShape(v, cuboid[i]) then outputChatBox(i .. ' taken by ' .. getVehicleName(v)) else outputChatBox(i .. ' free') end
  4. it wont because onVehicleDamage doesnt work on tires
  5. hello i'm just messing with my friend on the server and when he shot my wheel only I could see it's flat, he seen it as normal and when he entered the veh he was driving it like it's all ok, i tested it and really the flat tires arent synced, how can I fix them?
  6. Hello, recently seen that Cheat Engine is somehow able to edit client-side tables, is it true? How can I protect tables from being edited? Thanx
  7. Necktrox lord and savoir. Thank you!
  8. Oh well, thanks. So when i create the table for player data[source] = {things here} I need to put here all the variables i will be using in future for this table? I mean if i do it like this: data[source] = {deaths = 0, kills=0} And later on i wanna also add CASH here, it's possible? Or maybe even like in PAWN i could do like this: enum UserData { ID, Admin, Gender, SkinID, MaskID } And later then UserData[playerid][skinID] = 666
  9. Hello, i'm really struggling with saving players data in tables. Let's for example, i have that table: data = {} When player joins i want to set some things for him. I'm doing it by: data[source] = {deaths = 0, kills=0} Now, when player kills somebody i want to increase his kills. kills = data[source].kills + 100 data[source] = {kills= kills} But this is deleting the DEATHS value from table. How can i achieve it in other way? Thanks.
  10. Yeaaah. Foolish mistake! Thanks.
  11. toilet1 = createElement("toilet", "toilet1") toilet1:setData("times_used", 0) Hello! I'm pretty new to OOP in LUA and i have a problem. It's my code. But when i run the script it's giving me this error: attempt to index global 'toilet1' (a userdata value) I really dont know why. Could someone help me? OOP is enabled in mtaserver.cnf
  12. OMG. Forgive me. Foolish mistake. It've should been function startRefreshing() setTimer(triggerClientEvent, 1000, 0, "updateClientTable", root, informations) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), startRefreshing) instead of setTimer(triggerClientEvent, 1000, 0, "updateClientTable", root, informations)
  13. table.insert(informations.players, v) in this loop.
×
×
  • Create New...