
JanriKallas
Members-
Posts
19 -
Joined
-
Last visited
Everything posted by JanriKallas
-
Oh yeahh.. didnt thought of that!
-
is there way to getPedWeapon and ammo and insert it into table so after respawn it gets the table? I tried toJSON but it can give only one value so like weaponID but not ammo..
-
function setEngineState(source) if (source) then local car = getPedOccupiedVehicle(source) if (car) then local state = getVehicleEngineState ( car) setVehicleEngineState ( car, not state ) setElementData(car,"enginestate", not state) end end end function enterVehicle ( player, seat, jacked ) --when a player enters a vehicle local state = getElementData(source, "enginestate") if (state) then setVehicleEngineState(source, state) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
-
Lets say theres a three markers MechanicMarker MedicMarker PoliceMarker They are all invisible. Then function makes one of the Marker visible that player chose from clientside. So to not make three different function for policemarker, medicmarker, mechanicmarker Function () --clientside duty = GuigetText (bla1) TriggerEvent ("serverfunc", localplayer, localplayer, duty) End Function (player,duty) --duty is "Mechanic" / "Medic" / "Police" setElementVisibleTo (player, ..duty..Marker) end I alrady tried: (tostring(duty)Marker) and tostring (duty)..Marker
-
anyone???
-
Lets say theres a three markers MechanicMarker MedicMarker PoliceMarker They are all invisible. Then function makes one of the Marker visible that player chose from clientside. So to not make three different function for policemarker, medicmarker, mechanicmarker Function () --clientside duty = GuigetText (bla1) TriggerEvent ("serverfunc", localplayer, duty End Function (player,duty) --duty is "Mechanic" / "Medic" / "Police" setElementVisibleTo (player, MARKERNAME) end I alrady tried: (tostring(duty)Marker) and tostring (duty)..Marker
-
mechanicmarker medicmarker etc.. local duty = "Mechanic" setElementVisibleTo(player, dutyMarker) I want to make something like this but cant figure out how..
-
Can you answer one more question? local duty = "Mechanic" setElementVisibleTo(player, dutyMarker) in ElementVisibleTo I want to replace the duty word. How to do it?
-
How to calculate position front of the car. I want to put ped on to the front of the car.
-
If anyone is wondering on getting started, I made little account data save system https://community.multitheftauto.com/in ... s&id=12278
-
oh my bad, case sensitive Thanks a lot really!
-
I tried but it gets all the time ID 1 when inserting new row??
-
Problem solved.. dbExec(CREATE TABLE USER_TABLE (id INT NOT NULL AUTO_INCREMENT, x INT, y INT, z INT, PRIMARY KEY (id)) so everytime you insert it automatically puts an ID
-
I found this CREATE SEQUENCE SEQ_USER START WITH 1 INCREMENT BY 1; We will specify that we want to use the sequence and the NEXTVAL function in the INSERT INTO statement as follows: INSERT INTO USER_TABLE VALUES (SEQ_USER.NEXTVAL, 'Washington', 'George'); so i tried dbExec("CREATE SEQUENCE SEQ_USER START WITH 1 INCREMENT BY 1") dbExec(connection, "INSERT INTO USER_TABLE VALUES (?,?,?,?)",SEQ_USER .NEXTVAL,x,y,z) but it gets only errors attempt to index global "SEQ_USER" (a nil value)
-
When I insert new row(?) to table, I want each row has their own ID Should i do it like this? ID = 0 function() if (dbExec( connection, "INSERT INTO abc (id,x,y,z) VALUES (?,?,?,?)",ID,x,y,z))) then ID = ID+1 end end or how?
-
I want that script will dxDrawText a value that it gets from getElementData, but the data is so long like 93.232131231 but i want only to see like 93.2 is it possible?