
TheBull
Members-
Posts
23 -
Joined
-
Last visited
Everything posted by TheBull
-
I know what do you mean,but i dont even get any errors addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) local texture = dxCreateTexture ( "images/hydrabody256.jpg", "dxt5" ) local shader = dxCreateShader ( "texture.fx" ) dxSetShaderValue ( shader, "gTexture", texture ) engineApplyShaderToWorldTexture ( shader, "hydrabody256" ) end )
-
i made it like this : dxSetShaderValue(replace.fx, 'texture0', hydrabody256.png) and got this error : attempt to index global 'replace' (a nil value)
-
Not working , the error : bad argument @ 'dxSetShaderValue' [Expected material at argument 1,got nil.
-
hydrabody256 : http://postimg.org/image/95lduq92b/ hydradecal : http://postimg.org/image/fjcb3yewl/
-
do you mean this? texture gTexture; technique hello { pass P0 { Texture[0] = gTexture; } }
-
Helloo,I made a texture load script by looking to (engineApplyShaderToWorldTexture) in the wiki,but somehow it doesn't load the texture i want to load,it just becomes a clean white hydra,not customized or not even the original one,could you guys help me? Here is the client.lua : myShader = dxCreateShader( "replace.fx" ) engineApplyShaderToWorldTexture( myShader, "hydrabody256" ) ----------------------------------------------------------------- myShader = dxCreateShader( "replace.fx" ) engineApplyShaderToWorldTexture( myShader, "hydradecal" )
-
Thanks alot,it's working.
-
Still not working,no errors tho.
-
Not working.No errors appeared.
-
Helloo Guys. I've made a script to creat a rhino for vip players only but it's not working dont know why ,and when i spawn the vehicle i can't enter the vehicle,here are my codes : Client : function scriptCreateTank ( commandName ) local luckyBugger = getLocalPlayer() local x, y, z = getElementPosition ( luckyBugger ) createVehicle ( 432, x + 7, y, z + 2 ) end addCommandHandler ( "tank", scriptCreateTank ) addEvent("creatTank", true ) addEventHandler("creatTank", getRootElement(), scriptCreateTank ) Server : function creatVehicleCommand ( playerSource, commandName ) local acc = getPlayerAccount (playerSource) if acc and not isGuestAccount(acc) then local accName = getAccountName (acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then local theTriggerer = getPlayerName ( playerSource ) if commandName == "tank" then triggerClientEvent (root, "creatTank") end end end end addCommandHandler ( "tank", creatVehicleCommand )
-
Didn't work,could you tell me where should i replace it with? , Because i replaced it with all "playerSource"
-
And i got another problem , when a vip player plays these sounds only vip player can hear it,and normal players can't here it,is there a way to make non-vip players can hear them ?
-
Thank you guys for your help , I really appreciate that,one more question i disabled the Rhino's and hydra's and hunter's and jetpacks in my freeroam , and i want vip players be able to spawn these vehicles and get jetpacks,could you give me what functions and events should i use? I'm really sorry for asking alot , Once again thanks.
-
fools command is not working again , When i type the command (fools) it shows an error here it is : Bad 'sound/player' pointer @ 'setSoundVolume'(1)
-
Command (nyan) worked now i fixed the missing thing , but the command (fools) is still not working,and the error when i start the resource is : ERROR : Bad argument @ 'addCommandHandler' [Expected function at argument 2,got nil]
-
Still not working , ERROR : 'end' expected (to close 'function' at line 13) near .
-
Helloo. I've tried to make a script for playing musing for vip players only ,it's not working since i added getPlayerAccount,I really need you're help, Here is my code : Server : function nyanCommand ( playerSource, commandName ) local accName = getAccountName (acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent (source, "onNyanCat", root ) local theTriggerer = getPlayerName ( playerSource ) triggerClientEvent ( "onNyanCat", getRootElement() ) outputChatBox ( theTriggerer .. "#E45800 Is a Nyan Cat !", getRootElement(), 255, 255, 255, true ) end function foolsCommand ( playerSource, commandName ) local accName = getAccountName (acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent (source, "onFools", root ) local theTriggerer = getPlayerName ( playerSource ) triggerClientEvent ( "onFools", getRootElement() ) outputChatBox ( theTriggerer .. "#E45800 Is Killing Fools!", getRootElement(), 255, 255, 255, true ) end addCommandHandler ( "nyan", nyanCommand ) addCommandHandler ( "fools", foolsCommand ) Client : function nyan () stopSound ( sound ) sound = playSound("Nyan.mp3") setSoundVolume(sound, 1) end function fools () stopSound ( sound ) sound = playSound("Killingfools.mp3") setSoundVolume(sound, 1) end addEvent( "onNyanCat", true ) addEventHandler( "onNyanCat", getRootElement(), nyan ) addEvent( "onFools", true ) addEventHandler( "onFools", getRootElement(), fools ) And i disabled the Rhino's and hydra's and hunter's in my freeroam , and i want vip players be able to spawn these vehicles,could you give me what functions and events should i use?
-
It works perfectly,but the one i want is that vip players have their own hydra, and when a vip player see a player who's not vip he will see him in the normal hydra,not the customized one which the vip player have,and the same situation to the non-vip player.
-
Still not working,no errors appeared.
-
Hmm,Here's what i made : Server : function vipReplaceModele () local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then end triggerServerEvent ( "onReplace", resourceRoot ) end Client : function replaceModele () txd = engineLoadTXD("hydra.txd") engineImportTXD(txd, 520) dff = engineLoadDFF("hydra.dff", 520) engineReplaceModel(dff, 520) end addEvent( "onReplace", true ) addEventHandler( "onReplace", resourceRoot, replaceModele ) But it didn't work tho,there are no errors.
-
Hmm , I didn't understand since i'm new in scripting , could you give me an example?
-
Helloo I tried to make a script which can replace the current hydra to a customized one for (VIP) players only ,The script didn't work I would really appreciate if you guys help me , Here is my code : local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then txd = engineLoadTXD("hydra.txd") engineImportTXD(txd, 520) dff = engineLoadDFF("hydra.dff", 560) engineReplaceModel(dff, 520) end and the error is : ERROR:Hydra\replace.lua:1: attempt to call global "getPlayerAccount" (a nil value)