-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
function hidingaVehicle(player, command) local vehicle = getVehicleByID(id) if isElement(vehicle) then local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(player)), id), -1) if type(data) == "table" and #data ~= 0 then local aman = getVehicleOccupant(vehicle) destroyVehicle(vehicle) if isElement(player) and playerVehicles[player] then for i=1,#playerVehicles[player] do if playerVehicles[player][i] == vehicle then table.remove(playerVehicles[player],i) break end end else playerVehicles[player] = nil end outputChatBox("You destroy your vehicle", player, 255, 0, 0) cur = getElementData(player,"spawnedcars") or {} for ind,veh in ipairs(cur) do if veh == getVehicleNameFromModel(data[1]["Model"]) then table.remove(cur,ind) end end setElementData(player,"spawnedcars",cur) else outputChatBox("No vehicle is spawned", player, 255, 0, 0) end else outputChatBox("No vehicle is spawned ", player, 255, 0, 0) end end addCommandHandler ( "hide", hidingaVehicle )
-
What's wrong with this code?
-
Do you mean a green zone?
-
Btw bindKey ( player, "enter", "down", clientSubmitLogin ) You're using player outside the function plus not defined and after all it's client side and there's no player argument.
-
What do you mean by "your Handling set to 0 then"?
-
I just started scripting it But anyway thanks alot
-
There are alot of examples at the wiki, check the link in below. Click_Here!
-
Well thanks for all these answers I'll go ahead and try that.
-
By the way, It won't works, if your table is empty.
-
Hey, what you have coded was totally, wrong, try that function saveData() local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local lastname = getPlayerName(source) -- Last name dbExec(db, "UPDATE banking SET lastname=? WHERE name='"..tostring(account).."'LIMIT 1", lastname) end addEventHandler("onPlayerQuit", root, saveData) addEventHandler("onPlayerLogout", root, saveData)
-
Try that, local registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) local username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) local nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) addEventHandler("onClientGUIChanged", guiRoot, function () local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end)
-
Try that, [lua]local registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) local username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) local nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) addEventHandler("onClientGUIChanged", guiRoot, function () local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end) [/lua]
-
Here you go, local registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) local username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) local nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) addEventHandler("onClientGUIClick", guiRoot, function () if (source == registerBut) then local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end end)
-
Dude show the full code, if you automaticly posted what I have edited to your notepad, it won't work.
-
Simply, just check if the editbox is not empty that's mean it has some characters onto it. Try that and tell me the result. function nameLabel() local text = guiGetText(GUIEditor.edit[1]) if (text ~= "") then guiSetText(GUIEditor.label[2], "Available name!") end end Good luck.
-
Ah, so post what you have tried and I'll correct it
-
Hello dear scripters, I want to ask if there's a way to check out how many CPU usage used for each script. Is there's a way? Best Regards, KariM
-
Hmm, as far as the event onPickupLeave not exists, it's possible to make a custom event, You'll have to get the distance between the player and the pickup for example if the distance is more than 2meters then unbind the key. Use these functions getDistanceBetweenPoints3D --or getDistanceBetweenPoints2D unbindKey
-
Use directx Draw functions
-
Can you put a screenshot?
-
Glad to hear that, btw can I know how did you fix it? because what I had sent to you seem correct