-
Posts
1,491 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Walid
-
Go to settings > interface > lines > 30. i apologise for the late reply.
-
There is 3 methods to do it: 1) Using custom animation which MTA:SA doesn't support yet. 2) Change the properties of deagle then replace Deagle mod (DFF,TXD) to make it look like colt. 3) Change the player animation onClientPlayerWeaponSwitch > Create a custom weapon > Use bone attach resource to attach it to the player > Bind key (mouse1,mouse2) > setWeaponState to change the custom weapon state > many other things ....
-
I can't see it in your acl.xml file : Check the difference
-
i recommend you to read all of this : Scripting introduction
-
Copy and past it client side in your resource then use /restart <resourcename>
-
I'm pretty sure you don't undrestand how to use it , np try this code client side > restart your resource > switch to M4 > then run. addEventHandler("onClientPlayerWeaponSwitch", localPlayer, function (prevSlot, newSlot) if (newSlot == 5 and getPedWeapon(localPlayer, 5) == 31) then setPedWalkingStyle(localPlayer, 69) else setPedWalkingStyle(localPlayer, 0) end end )
-
??? run and press E or A to switch weapon.
-
just copy and past my code server side then press T /sneak that's all.
-
Wrong section next time post your question here, anyways you can run with weapons by changing your walking style to sneak. Example: -- use /sneak to chnage your walking style function changeWalkStyle(player) setPedWalkingStyle(player,69) end addCommandHandler("sneak",changeWalkStyle)
-
Try to use sth like this function START_DOUBLE_SIDED_TRANSACTION() _createObject = createObject createObject = createObjectDoubleSided end function END_DOUBLE_SIDED_TRANSACTION() createObject = _createObject end function createObjectDoubleSided( ... ) local arg = {...} local temp = _createObject( unpack(arg) ) setElementDoubleSided(temp, true) --Enable / disable return temp end it's making createObject always set the object as double sided. START_DOUBLE_SIDED_TRANSACTION() -- put all your created object here -- createObject(7488,1282.599609375, 1002, -6.0999999046326, 0, 0, 122.98101806641) END_DOUBLE_SIDED_TRANSACTION()
-
Here you go: Arabic sub-board
-
I replace it here local myCol = createColRectangle (1000, 500, 30, 20) function destroyTheVehicles (player) if getElementType (player) == "player" and isPedInVehicle (player) then destroyElement (getPedOccupiedVehicle (player)) outputChatBox ("Vehicles are not allowed here!", player, 255, 0, 0) end end addEventHandler ("onColShapeHit", myCol, destroyTheVehicles)
-
Waste of time simply replace MessagePlayer with outputChatBox() outputChatBox("Welcome to the kewun's beta test server",source) You don't need to use this function. function MessagePlayer(player,text) outputChatBox(text,player) end
-
Fixed not being able to see the video.
-
Wrong section post it here: Resources
-
Added this two lines to your Admin acl. <right name="function.startResource" access="true" /> <right name="function.stopResource" access="true" /> And restart the server or just use aclReload . function reloadACL (player) local reload = aclReload() if ( reload ) then outputChatBox ( "ACL was successfully reloaded.",player, 255, 0, 0) end end addCommandHandler ("reloadACL", reloadACL)
-
If it's not local function and is on the same side then yes you can call it. same thing with variables because every lua file in a resource is a code block, that can have it's local (variables/functions). if it's not local in this code block it become accessible in other lua files in the same resource. Note: local variables have a scope limited to the block where they are declared so outside of that block they are either nil or have some other value if defined. local function test() -- local function local variable = "Hello" -- local variable function test() -- Global function variable = "Hello" -- Global variable
-
For triggerServerEvent, client is always set. i.e.: triggerServerEvent("EventName" , localPlayer) source is localPlayer client is localPlayer triggerServerEvent("EventName" , resourceRoot or root) source is resourceRoot or root client is localPlayer
-
@Gravestone, _G predefined variable it returns a table of all global variables.
-
You should use the global variable client serverside instead of passing the localPlayer by parameter. -- Client-side function panel() w = guiCreateWindow(x,y,w,h,"money",false) b = guiCreateButton(x,y,w,h,"moneyb", false, w) showCursor(true) addEventHandler("onClientGUIClick", b, function() triggerServerEvent("moneyhere", resourceRoot) destroyElement(w) showCursor(false) end, false) end -- Server-side function givemoney() givePlayerMoney(client, 10000) end addEvent("moneyhere",true) addEventHandler("moneyhere", resourceRoot, givemoney)
-
local results = dbPoll( dbQuery( connection, "SELECT * FROM teaminfo WHERE teamname = ?", Added team name here ), -1 ) -- added the team name Or try to use something like this . function getTeams() local data = dbPoll(dbQuery(connection,"SELECT * FROM teaminfo"), -1) return data end function doo(player) local names = getTeams() if names then for i, v in ipairs(names) do outputChatBox(v.teamname) end end end addCommandHandler("teams", doo)
-
Wrong section post your question here.
-
First, Good job. Second, i will post my report here: i think it's not possible to edit old posts.
- 84 replies
-
- mtasa
- forum stuff
-
(and 5 more)
Tagged with:
-
function MarkerHit(player) -- Added player here i think it's better if you put the whole code server side.