-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
dxDrawRectangle devuelve 'true' o 'false', no devuelve un elemento, si queres usarlos como botones, podrias crear una label en la misma posicion.
-
You can edit the script to check if the current map is a 'DM' map.
-
I told you to use 'pairs' not 'ipairs'. -- client side: addEvent ( "onServerToggleRadio", true ) addEventHandler ( "onServerToggleRadio", root, function ( sounds ) for vehicle, id in pairs ( sounds ) do if isElement ( vehicle ) then triggerEvent ( "createSoundClient", localPlayer, id, vehicle ) end end end ) -- server side: addEvent ( "onPlayerToggleRadio", true ) addEventHandler ( "onPlayerToggleRadio", root, function ( ) triggerClientEvent ( source, "onServerToggleRadio", source, sounds ) -- You had to use 'source' here, else, it would trigger to everyone. end )
-
I'll try to explain how to do it as good as I can: 1: Trigger a server side event from the client side using triggerServerEvent when the resource starts ( onClientResourceStart ) 2: On the server side, add this event using addEvent & addEventHandler, then, you must trigger a client side event using triggerClientEvent, where you'll send the 'sounds' table. 3: On the client side, add this new event you triggered from the server side using addEvent & addEventHandler, then, define the function with one argument, which will be the table you sent from the server side. 4: Loop this table with 'pairs' for-loop ( http://lua-users.org/wiki/ForTutorial ), then, use triggerEvent to trigger the 'createSoundClient' event passing theVehicle and ID from the table., so you don't have to define playSound and so on again.
-
That's becuase you are creating the GUI twice, see here: You create it twice, change it to: end addEventHandler("onClientResourceStart", resourceRoot ,disableStuffOnJoin)
-
You must create a colshape around the gate, using one of the colshape functions.
-
Well, if you want to spawn the player without having to login, then use 'onPlayerJoin'.
-
What are you trying to do?
-
Es porque estas usando la funcion 'setElementExtraHealth' mal, tenes que poner cuanta vida extra le queres dar. Ejemplo: Cambia ese 'true' por 5000, y el bot tendra 5000 puntos de vida extra.
-
When exactly are you triggering this event?
-
And what does it return on the client side? have you checked if it isn't also returning 'nil'?
-
It's nice, someone else tried to do the same long ago, but abandoned. Good luck with it.
-
Remove that getPlayerAccount line, is not required and is wrong.
-
'playeraccount' is not defined, do this: function joinHandler ( _, playeraccount )
-
Try this one: http://pastebin.com/7s0Rh7hj
-
When a player joins, he won't be logged, you have to use the event onPlayerLogin instead.
-
https://wiki.multitheftauto.com/wiki/Re ... s#Protocol Could you post your ACL.xml content?
-
There's an event for when a ped dies: https://wiki.multitheftauto.com/wiki/OnClientPedWasted
-
You have to check if 'seat' is different to '0', then stop the function. vehicle1 = createVehicle ( 602, 2279.1000976563, -1671.1999511719, 15.10000038147, 0, 0, 272 ) -----this car can be found at LS Grove Street near PoolBar vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) setVehicleDamageProof ( vehicle, true ) -----car won't take damage (change it to false if you want to take damage) function lockPrivate( player, seat, jacked ) if ( source == vehicle1 ) then if ( seat ~= 0 ) then -- If the seat isn't '0' ( driver's seat ) return -- Stop the function from executing. end local playerTeam = getPlayerTeam ( player ) local oldTeamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( oldTeamName ~= "admin" ) then cancelEvent ( ) outputChatBox ( "This vehicle is locked for following team: admin ", player, 255, 0, 0, false ) else outputChatBox ( "Welcome to your vehicle,Sir!", player, 0, 255, 0, false ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) -----Made by Alen141(ingame name:Jimboy)------ -----Special thanks to : Solidsnake14(ingame name:Castillo)----- -----Visit SAUR Utopia RPG, IP: 128.204.203.103:22003----- -----Feel free to edit script on your own----- -----Don't remove credits-----
-
Max health is 200% using a stat ( setPedStat ), but you could use my resource "extra_health" which is used to give players/peds any amount of health.
-
I made half of the work, now you have to do what I said.
