-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
Well, the time has passed and Motorola chose to help out with the project.
-
I would need to see both the client and server side files... If you don't want to share it on this forum, just send it to me through PM.
-
Sorry, why do you need this info?
-
Try this: --[[--------------------------------- | Panel Logowania by MACIEKW89 | | Strona Serwera | -----------------------------------]] addEvent("onClickLogin", true) addEvent("onClickRegister", true) addEvent("onLoginSpawn", true) addEvent("onRegisterSpawn", true) setGameType ( "ZombieMode v1.0" ) setMapName ( "San Zombies" ) --Logowanie-- addEventHandler("onClickLogin", getRootElement(), function(plr, username, password) local account = getAccount(username, password) if (account ~= false) then if (logIn(plr, account, password)) then outputChatBox("Zalogowano pomyślnie", plr, 0, 255, 0) triggerClientEvent("onSuccessLogin", getRootElement()) else outputChatBox("Błąd 1 - Logowanie lin.19 ZGŁOŚ ADMINOWI!", plr, 255, 0, 0) end else outputChatBox("Błędny login lub hasło!", plr, 255, 0, 0) end end) --Rejestracja-- addEventHandler("onClickRegister", getRootElement(), function(plr, username, password) local account = getAccount(username, password) if (account ~= false) then outputChatBox("Takie konto już istnieje!", plr, 255 , 0, 0) else local accountAdd = addAccount(username, password) if(logIn(plr, accountAdd, password)) then outputChatBox("Zarejestrowano pomyślnie!", plr, 0 , 255, 0) triggerClientEvent("onSuccessRegister", getRootElement()) else outputChatBox("Błąd 2 - Rejestracja lin.39 ZGŁOŚ ADMINOWI!", plr, 255 , 0, 0) end end end) --Spawn-- addEventHandler ("onLoginSpawn", getRootElement(), function(player) fadeCamera(player, true) setCameraTarget(player, player) end) addEventHandler("onRegisterSpawn", getRootElement(), function(player) local x = 2491.57 local y = -1672.27 local z = 13.3359 spawnPlayer(player, x, y, z) fadeCamera(player, true) setCameraTarget(player, player) giveWeapon(player, 29, 1000) end) --Respawn-- addEventHandler( "onPlayerWasted", getRootElement(), function() setTimer( spawnPlayer, 5000, 1, source, 2491.57, -1672.27, 13.3359 ) end) That should work, if it doesn't then please tell us what's the problem and what you are trying to do.
-
Try this: https://forum.multitheftauto.com/viewtopic.php?f ... Open+Ports
-
Functions: bool openPicker ( element/string id , color, string title) Opens the Color Picker. Arguments: Required: id - element/string/whatever - stuff that will be returned in event for you to know for which element the picker was opened Optional: color - optional, if set to hex color, will open picker with that color selected title - optional, sets picker window title Return: true - if picker was created successfully false - if a picker for that ID is already open. bool closePicker ( elemnt/string id ) Closes the corresponding colorpicker window (same as "Cancel" button) Arguments: Required: id - element/string/whatever Returns: true - if picker for supplied ID existed false - otherwise
-
Nice to know, what about GTA?
-
Make sure you use the domain "mtasa.com" instead of "multitheftauto.com"
-
try this: local msgs = {'traidor', 'espia', 'malo'} addCommandHandler ("traidor", function() local text = msgs [ math.random ( #msgs )] local randomPlayer = getRandomPlayer() outputChatBox ( "* #FFFFFF"..getPlayerName ( randomPlayer ).." #0080FFes el #FF8000"..text.." #0080FFen cubierto!",root, 255, 255, 255, true ) end ) addEventHandler("onPlayerChat",getRootElement(), function(message,messageType) if message == "!traidor" then local text = msgs [ math.random ( #msgs )] local randomPlayer = getRandomPlayer() outputChatBox ( "* #FFFFFF"..getPlayerName ( randomPlayer ).." #0080FFes el #FF8000"..text.." #0080FFen cubierto!",root, 255, 255, 255, true ) end end )
-
Not sure if this is what you wanted... try this: local msgs = {'traidor', 'espia', 'malo'} local randomPlayer = getRandomPlayer ( ) addCommandHandler ("traidor", function() local text = msgs [ math.random ( #msgs )] outputChatBox ( "* #FFFFFF"..getPlayerName ( randomPlayer ).." #0080FFes el #FF8000"..text.." #0080FFen cubierto!",root, 255, 255, 255, true ) end ) addEventHandler("onPlayerChat",getRootElement(), function(message,messageType,randomPlayer) if message == "!traidor" then local text = msgs [ math.random ( #msgs )] outputChatBox ( "* #FFFFFF"..getPlayerName ( randomPlayer ).." #0080FFes el #FF8000"..text.." #0080FFen cubierto!", getRootElement(), 255, 255, 255, true ) end end )
-
local disco = { timer = {} state = {} } addCommandHandler("disco", function(source) local vehicle = getPedOccupiedVehicle(source) if not vehicle then outputChatBox( "* #0080FFNecesitas un vehiculo para usar el comando!", source, 255, 255, 255, true ) return end if not disco.state[source] then disco.state[source] = true disco.timer[source] = setTimer( function(veh) setVehicleOverrideLights(veh, 2) setVehicleHeadLightColor(veh, math.random(0,255), math.random(0,255), math.random(0,255) ) end, 150, 0, vehicle) outputChatBox( "* #0080FFDisco light Activado!", source, 255, 255, 255, true ) else outputChatBox( "* #0080FFDisco light Desactivado!", source, 255, 255, 255, true ) if disco.timer[source] then killTimer( disco.timer[source] ) disco.state[source] = false setVehicleOverrideLights(vehicle, 1) setVehicleHeadLightColor(vehicle, 255, 255, 255 ) end end end ) addEventHandler( "onResourceStart",resourceRoot, function() for _, players in ipairs( getElementsByType( "player" ) ) do disco.state[players] = false end end ) addEventHandler( "onPlayerJoin",root, function() disco.state[source] = false end ) addEventHandler( "onPlayerQuit", root, function() disco.state[source] = false killTimer( disco.timer[source] ) end )
-
ok, try this: local discoTimer = {} local discoState = {} addCommandHandler("disco", function(source) local vehicle = getPedOccupiedVehicle(source) if not vehicle then outputChatBox( "* #0080FFNecesitas un vehiculo para usar el comando!", source, 255, 255, 255, true ) return end if not discoState[source] then discoState[source] = true discoTimer[source] = setTimer( function (veh) setVehicleOverrideLights(veh, 2) setVehicleHeadLightColor(veh, math.random(0,255), math.random(0,255), math.random(0,255) ) end, 150, 0, vehicle) outputChatBox( "* #0080FFDisco light Activado!", source, 255, 255, 255, true ) else outputChatBox( "* #0080FFDisco light Desactivado!", source, 255, 255, 255, true ) if discoTimer[source] then killTimer( discoTimer[source] ) discoState[source] = false setVehicleOverrideLights(vehicle, 1) setVehicleHeadLightColor(vehicle, 255, 255, 255 ) end end end ) addEventHandler( "onResourceStart",resourceRoot, function() for _, players in ipairs( getElementsByType( "player" ) ) do discoState[players] = false end end ) addEventHandler( "onPlayerJoin",root, function() discoState[source] = false end ) addEventHandler( "onPlayerQuit", root, function() discoState[source] = false killTimer( discoTimer[player] ) end )
-
try this: local discoTimer = {} local discoState = {} function Disco(player,command) local vehicle = getPedOccupiedVehicle(player) if (vehicle) then if discoState[player] == false then discoState[player] = true discoTimer[player] = setTimer( function (vehicle) setVehicleOverrideLights(vehicle, 2) setVehicleHeadLightColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255) ) end, 150, 0, vehicle ) outputChatBox( "* #0080FFDisco light Activado!", player, 255, 255, 255, true ) else outputChatBox( "* #0080FFDisco light Desactivado!", player, 255, 255, 255, true ) if discoTimer[player] then killTimer( discoTimer[player] ) discoState[player] = false setVehicleOverrideLights(vehicle, 1) setVehicleHeadLightColor(vehicle, 255, 255, 255 ) end end else outputChatBox( "* #0080FFNecesitas un vehiculo para usar el comando!", player, 255, 255, 255, true ) end end addCommandHandler("disco",Disco) function setStateOnStart() for _, players in ipairs( getElementsByType( "player" ) ) do discoState[players] = false end end addEventHandler( "onResourceStart",resourceRoot, setStateOnStart ) function setStateOnJoin() discoState[source] = false end addEventHandler( "onPlayerJoin",root, setStateOnJoin ) function removeStateOnQuit() discoState[source] = false killTimer( discoTimer[player] ) end addEventHandler( "onPlayerQuit", root, removeStateOnQuit) Fixed some other problems in the script.
-
I'm not sure if it runs before server-side scripts, but what I do know is, anything outside the function is ran first. Example: setElementData(localPlayer,"Test","Test") --This would run right away, basically setting the player data after the resource is downloaded addEventHandler("onClientMarkerHit",root,function() setElementData(localPlayer,"Test","New Test") --This would set the player data after they hit a marker end)
-
well, I'm not sure, I haven't tried it, but I doubt it'll work, unless you create the weapon separate from the player it self.
-
Well, the player can't shoot from a parachute because in GTA:SA the player hands are attached to the parachute, so the only way I could think of for you is to create a weapon and use the functions for that. createWeapon -Create the weapon fireWeapon or setWeaponState -These are used for firing the weapon setWeaponTarget -Set the Co-ordinates or target for the weapon to shoot at destroyElement -When the player touches the ground or is on the ground, destroy the weapon