xXMADEXx
Members-
Posts
2,718 -
Joined
-
Last visited
Everything posted by xXMADEXx
-
I Think he meant the server browsing menu ..etc . Yes ^^ that. Sorry i wasn't a little more clear.
-
"ddCommandHandler ( "mk", function ()"
-
You are triggering a ''kickAPlayer" Event and at the server side "onClientPlayerHeliKilled" I hope it's another joke . Code is fixed now.
-
I don't really recommand making a server, without past scripting experiance... But, you can order scripts @ http://mtamarket.com/
-
Here; -- Client: addEventHandler ( "onClientPlayerHeliKilled", root, function ( killer ) triggerServerEvent("kickAPlayer", source, killer) end ) -- Server addEvent ( "kickAPlayer", true ) addEventHandler ( "kickAPlayer", root, function ( who ) kickPlayer ( who, "You killed: ".. getPlayerName ( source ) .." With A Heli." ) end )
-
I was browsing though the MTA open source files, but i don't know where the GUI files are located... Could anyone give me a link please?
-
setTimer ?
-
Your getting functions & events wayy mixed up. From the looks of it, you are really new to scripting. Client: local theMarker = createMarker ( x, y, z, "cylinder", 3, 0 255 0 ) function onMarkerHit () outputChatBox ("Type /mk to buy 25% of Health") end addEventHandler ("onClientMarkerHit", onMarkerHit) function commandMK ( ) if ( getPlayerMoney ( localPlayer ) > 1499 ) then outputChatBox("You have bought 25% health for $1,500", 0, 255, 0) triggerServerEvent ( "setPlayerHealth", localPlayer ) end end addCommandHandler( "mk", commandMK ) Server: function setPlayerHealth ( ) local newHealth = getElementHealth ( source ) + 25 setElementHealth ( source, newHealth ) takPlayerMoney ( source, 1500 ) end addEvent ( "setPlayerHealth", true) addEventHandler ( "setPlayerHealth", root, setPlayerHealth)
-
Thank you very much , it works.
-
Okey, so i updated the script, but its returning table data... addCommandHandler ( "c", function ( player, command, accnt ) local new = dbQuery ( dbc, "SELECT name FROM Accounts WHERE name=?", accnt ) outputChatBox ( tostring ( dbPoll ( new, -1 ) ) ) end )
-
Hi guys, im trying to check my database, to see if the account exists. For some reason, it just keeps returning true, and i don't really know how to make it check if the account exists, and if it does then return true, but if it dosn't then return false... Please help. addCommandHandler("c", function ( player, command, accountName ) local v = dbExec ( dbc, "SELECT name FROM Accounts WHERE name=?", accountName ) outputChatBox ( tostring ( v ) ) end )
-
I think he is trying to make something like change commands from like "/admins" to "!admins" if that is what your trying to do, i guess you would just have to find the string of "!admins," when someone types a message...
-
This is pretty pointless, because you can just make a shortcut on your desktop...
-
This means you are trying to steal scripts. We don't help thieves.
-
The way i became good at it is by posting help topics, and messing with community scripts...
-
I guess, try this: function enterVehicle ( thePlayer, seat, jacked ) local modelo = getVehicleModelFromName ( getVehicleName ( source ) ) if modelo == 422 then setElementData(source, "Tire_inVehicle", 4) setElementData(source, "Engine_inVehicle", 11) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 470 then setElementData(source, "Tire_inVehicle", 4) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 468 then setElementData(source, "Tire_inVehicle", 2) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 433 then setElementData(source, "Tire_inVehicle", 6) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 437 then setElementData(source, "Tire_inVehicle", 6) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 487 then setElementData(source, "Tire_inVehicle", 0) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 497 then setElementData(source, "Tire_inVehicle", 0) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 453 then setElementData(source, "Tire_inVehicle", 0) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) end outputChatBox ( "Car repared", thePlayer) end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle )
-
yes, but I had nothing to do, so i thought why not.
-
... im pretty sure that triggering a client event is the only way.
-
Your English is to hard for me to understand. But, i think this is what yoru asking for. Server: function addRednessOnDamage ( ) fadeCamera ( source, false) p = source setTimer ( function () fadeCamera(p,true) end, 5000, 1, source) end addEvent("addRednessOnDamage", true) addEventHandler ( "addRednessOnDamage", root, addRednessOnDamage) Client: addEventHandler("onClientGUIClick", root, -- Make sure to replace "root" with the button variable. function () triggerServerEvent ( "addRednessOnDamage", source) end )
-
Try this.. function addRednessOnDamage ( ) fadeCamera ( source, false) p = source setTimer ( function () fadeCamera(p,true) end, 5000, 1, source) end addEventHandler ( "onPlayerDamage", getRootElement(), addRednessOnDamage )
-
Revolution of Scripting what shut down due to no income. Any scripts that were on Revolution of Scripting can now be found at https://www.mediafire.com/folder/h4kcbey50ld5z/scripts
-
You put "Wated" addEventHandler("onPlayerWasted", getRootElement(),respawn)
-
Not sure about the first question, but defiantly don't use XML to store the data.
