-
Posts
906 -
Joined
-
Last visited
-
Days Won
61
Everything posted by Shady1
-
hello, I have prepared a code related to your problem, if your problem persists, you can try this code --client local x, y, z = 215.54638671875,2068.0607910156,20 local marker = createMarker(x, y, z, "cylinder", 1.3, 255, 0, 0) addEventHandler("onClientMarkerHit", marker, function(hitPlayer, matchingDimension) if hitPlayer == getLocalPlayer() then triggerServerEvent("giveWeaponToPlayer", hitPlayer, 23, 250) -- weapon id is 23 and ammo is 250 end end) --server addEvent("giveWeaponToPlayer", true) addEventHandler("giveWeaponToPlayer", root, function(weaponID, weaponAmmo) giveWeapon(client, weaponID, weaponAmmo) end )
-
you're welcome, i love that your problem has been fixed, if you have any questions, create a new thread and tag me If you like my comments, you can like comment
-
welcome to the forum, i don't understand your question much, i suggest you explain a bit more so i can help you better,but i sent you a code, i want you to test it... local marker = createMarker(-704.3701171875,963.20855712891,11, "cylinder", 1.3, 244, 244, 244, 244) local skin = getElementModel(localPlayer) local marker_1 function startJob(hitPlayer) local isJob = getElementData(hitPlayer, "job") if (isJob) then if(isElement(marker_1)) then destroyElement(marker_1) marker_1 = nil end setElementData(hitPlayer, "job", nil) setElementModel(hitPlayer, skin) outputChatBox("Goodbye, now you cant work", 255, 255, 255, true) else if(isElement(marker_1)) then destroyElement(marker_1) marker_1 = nil end marker_1 = createMarker(-688.35162353516, 953.43170166016, 11, "cylinder", 1.3, 244, 244, 244, 244) setElementData(hitPlayer, "job", true) outputChatBox("Hey! You can work.", 255, 255, 255,true) setElementModel(hitPlayer, 50) end end addEventHandler('onClientMarkerHit', marker, startJob) @w3rt1x
-
https://wiki.multitheftauto.com/wiki/SetVehicleAdjustableProperty hello welcome to the forum I hope this is the code you want to learn
- 1 reply
-
- 1
-
-
you're welcome, if you have any new questions please create a new topic and tag me
-
welcome to the forum, i made a code for you, i didn't test it, you should try this --client function giveMoney(hitPlayer, matchingDimension) if hitPlayer == localPlayer then outputChatBox("Okey it's your money") triggerServerEvent("giveMoney", hitPlayer, 1000) --enter amount here end end addEventHandler("onClientMarkerHit", marker, giveMoney) --server addEvent("giveMoney", true) addEventHandler("giveMoney", root, function(amount) givePlayerMoney(client, amount) end )
-
Shady1#8980 new ID
-
i suggest you to use mta sdk for this project, + you used sql codes, put them on Lua side. http://code.opencoding.net/mta/mtaphpsdk_0.4.zip [TUT] : https://forum.multitheftauto.com/topic/32557-tut-php-sdk/
-
function test (url) sendOptions = { formFields = { verifyUserAccessTOJSON = toJSON( {busca = '1' }) }, } fetchRemote ( url, sendOptions, notificationCallback ) end function notificationCallback(data, info) test = fromJSON("["..data.."]") outputDebugString(test) end test('noLinkForSecurity') hi you should test this code and let me know if you have any problem on debug side,I don't understand exactly what you want
-
l have boss system and airdrop, contact to me... Discord : Shady1#0001
-
https://nightly.mtasa.com/mtasa-1.5.9-rc-21437-20221205.exe
-
preciso de ajuda pfv sou novo no mta e script
Shady1 replied to Thalles123's topic in Programação em Lua
Ola, local ADMIN_SKIN = 0 --admin skin id addEventHandler("onPlayerSpawn", root, function() local playerAccount = getPlayerAccount(player) -- get player account local accountName if(not playerAccount) then return end -- if not exists account dont go further if(isGuestAccount(playerAccount)) then return end -- if account is guest account dont go further accountName = getAccountName(playerAccount) -- at the moment get account name if(isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then -- if account on Admin Group Enter here setElementModel(source, ADMIN_SKIN) -- set player skin to admin end end ) -
mtadiag download and run then pastebin/xxx send us the link
-
Hi, welcome to MTA forum, check this post, for verdana.ttf
-
I tried the code I sent you and observed that there is no problem with the z coordinate and it works properly. ray = {} addEventHandler("onClientPlayerWeaponFire", getRootElement(), function( _, tAmmo, cAmmo, hX, hY, hZ, hElement, sX, sY, sZ) local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source) local targetX, targetY, targetZ = getPedTargetEnd(source) local collisionX, collisionY, collisionZ = getPedTargetCollision(source) if(collisionX) then table.insert(ray, {muzzleX, muzzleY, muzzleZ, collisionX, collisionY, collisionZ}) else table.insert(ray, {muzzleX, muzzleY, muzzleZ, targetX, targetY, targetZ}) end end) function drawRays() for i, v in ipairs( ray ) do dxDrawLine3D( v[ 1 ], v[ 2 ], v[ 3 ], v[ 4 ], v[ 5 ], v[ 6 ], tocolor( 255, 0, 0, 100 ), 2 ) end end addEventHandler( "onClientRender", root, drawRays )
-
can you try the above code
-
mta directory /mods/deathmatch/resources (delete all files and login again),If you have installed the mod separately, I recommend removing it.
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=652 I did a lot of research, but I didn't find much information, there was a study similar to this in the community, can you check it, maybe there is some code that will work for you ray = {} addEventHandler("onClientPlayerWeaponFire", getRootElement(), function( _, tAmmo, cAmmo, hX, hY, hZ, hElement, sX, sY, sZ) local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source) local targetX, targetY, targetZ = getPedTargetEnd(source) local collisionX, collisionY, collisionZ = getPedTargetCollision(source) if(collisionX) then table.insert(ray, {muzzleX, muzzleY, muzzleZ, collisionX, collisionY, collisionZ}) else table.insert(ray, {muzzleX, muzzleY, muzzleZ, targetX, targetY, targetZ}) end end) function drawRays() for i, v in ipairs( ray ) do dxDrawLine3D( v[ 1 ], v[ 2 ], v[ 3 ], v[ 4 ], v[ 5 ], v[ 6 ], tocolor( 255, 0, 0, 100 ), 2 ) end end addEventHandler( "onClientRender", root, drawRays ) bro can you test it i tested it works
-
you can't create an unlimited range beam except for collision data this will fail
-
"GetPedTargetCollision" can you try this function, otherwise the collision data will not be loaded GTA also doesn't load an entire map collisions,just enough
-
yes as i think, your opinion with the server owner is about this issue, i think it might be because of a script
-
can you try
-
1 second, is this issue only on one server?
-
check your scripts files