-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
If you don't understand what x1w#ALBANDER means, here's a simple explanation; 1. go to C:\Program Files (or x86)\MTA\server\mods\deathmatch 2. edit acl.xml with notepad or optional notepad++ 3. on line 18 there's the start of the admin group ( ) 4. add this line example: "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "resource.admin"> "resource.webadmin"> "user.ViRuZ">
-
Yes that script, I have a MySQL Database, how do I convert it?
-
if I can't even activate my paypal account, how'll I pay with USD? Paypal is global (worldwide) so every country has it, the reason why you can't activate is because you don't use a Creditcard like Mastercard, Visa, etc... What I guess, you are too young for a creditcard and you want someone who has it.
-
Now I have only a problem with when I reach the end marker; CLIENT addEventHandler("onClientMarkerHit", lvMarker, function ( hitElement, matchingDimension) if (hitElement == localPlayer) and (matchingDimension == true) then triggerServerEvent("onLVHit", localPlayer) end end ) SERVER addEvent("onPilotAccept", true) addEventHandler("onPilotAccept", root, function () local thePlayer = source pilotPlane = createVehicle (577, -1641.5, -148.39999, 14.5, 0, 0, 314.25) warpPedIntoVehicle ( thePlayer, pilotPlane ) addEventHandler("onVehicleExit", pilotPlane, function (thePlayer) destroyElement(pilotPlane) setElementPosition(thePlayer, -1423.8000488281, -289.89999389648, 14.10000038147) setElementRotation(thePlayer, 0, 0, 138.004119) triggerClientEvent("destroyLVMarker", thePlayer) end ) addEvent("onLVHit", true) addEventHandler("onLVHit", root, function (thePlayer) destroyElement(pilotPlane) setElementPosition(thePlayer, -1423.8000488281, -289.89999389648, 14.10000038147) setElementRotation(thePlayer, 0, 0, 138.004119) givePlayerMoney(thePlayer, 1000) triggerClientEvent("destroyLVMarker", thePlayer) end ) end ) OnVehicleExit works fine
-
hello, When I exit the plane the plane gets destroyed but the blip not, Server Client
-
Hello, Why doesn't this save the playtime when the resources end? local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "Online Time", tostring( hour )..':'..tostring( min )..':'..tostring( sec ) ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'Online Time' ) setAccountData ( playeraccount, "Online Time", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "Online Time" ) if ( time ) then setElementData ( source, "Online Time", time ) else setElementData ( source, "Online Time",0 ) setAccountData ( playeraccount, "Online Time",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin )
-
UPDATED! Huge thanks to IIYAMA who learned me scripting and especial the Tables. • Added Blip till 200m visible • Added Table to add Vehicles, Vehicles spawnpoints and Prices
-
vehicles[i] = createVehicle(sv[i][1], sv[i][2], sv[i][3], sv[i][4], sv[i][5], sv[i][6], sv[i][7]) attempt to index global 'vehicles' (a nil value)
-
Thx and also thx to Wassim.
-
Hello, I'm not experienced with tables I know a bit of them but they are really usefull, i'm trying something but I don't know if this is correct. Now I made my showroom vehicles like this; But can I do something like this; showroomVehicles = { {model1, x1, y1, z1, rx1, ry1, rz1}, -- This is filled in with the information of the alphaShowroom {model2, x2, y2, z2, rx2, ry2, rz2}, -- This with the info from the banshee } function showroomVehicles () showroomVehicles = createVehicle ( model, x, y, z, rx, ry, rz ) setVehicleLocked ( showroomVehicles , false ) setVehicleDamageProof( showroomVehicles , true ) setVehicleEngineState ( showroomVehicles , false ) setVehicleFuelTankExplodable ( showroomVehicles , false ) setVehicleColor ( showroomVehicles , 255, 255, 255 ) setVehiclePlateText ( showroomVehicles , "Banshee" ) setElementFrozen ( showroomVehicles , true ) showRoomVehicles[showroomVehicles ]=true end
-
This is from the basic script: createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) Does that become this: local blip = exports.customblips:createCustomBlip ( x, y,32, "images/player.png", 50 ) attachElements ( blip, players[source][1], players[source][2], players[source][3] ) and what with the x,y of the createcustomblip?
-
Hi guys, I really want to use this with MySQL, I have a database from the same host I got my server from but how do I connect the house system to my database? There are no connect functions only table create functions in the script. Does anyone know it, or is DaKiLLa active here?
-
Hello, I'm using Customblips and Playerblips but I want to change the player's blip to a customblip. Playerblips: root = getRootElement () color = { 0, 255, 0 } players = {} resourceRoot = getResourceRootElement ( getThisResource () ) function onResourceStart ( resource ) for id, player in ipairs( getElementsByType ( "player" ) ) do if ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] ) end end end function onPlayerSpawn ( spawnpoint ) if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end function onPlayerQuit () destroyBlipsAttachedTo ( source ) end function onPlayerWasted ( totalammo, killer, killerweapon ) destroyBlipsAttachedTo ( source ) end function setBlipsColor ( source, commandName, r, g, b ) if ( tonumber ( b ) ) then color = { tonumber ( r ), tonumber ( g ), tonumber ( b ) } for id, player in ipairs( getElementsByType ( "player" ) ) do destroyBlipsAttachedTo ( player ) if ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] ) end end end end function setBlipColor ( source, commandName, r, g, b ) if ( tonumber ( b ) ) then destroyBlipsAttachedTo ( source ) players[source] = { tonumber ( r ), tonumber ( g ), tonumber ( b ) } createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) end end addCommandHandler ( "setblipscolor", setBlipsColor ) addCommandHandler ( "setblipcolor", setBlipColor ) addEventHandler ( "onResourceStart", resourceRoot, onResourceStart ) addEventHandler ( "onPlayerSpawn", root, onPlayerSpawn ) addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerWasted", root, onPlayerWasted ) function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end Customblip exports.customblips:createCustomBlip ( x, y,32, "images/player.png", 50 ) How can I get it in?
-
bad player pointer, dxDrawText ( tostring ( getTeamName ( getPlayerTeam ( localPlayer ) ) ), team_X, name_Y, team_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "bankgothic" )
-
Thx TAPL It works now
-
Error can't load image, dxDrawImage ( x,y, width, height, self.strPath, self.fRot, self.fRotXOff, self.fRotYOff, tocolor(unpack(self.tColor)), self.bPostGUI ) This is original script i didn't write this
-
It's the code i've posted above yours
-
Now I see false instead of the user's team.
-
local text_h = dxGetFontHeight ( 1, "bankgothic" ) addEventHandler("onClientRender",root, function ( ) local name_X = 350 local team_X = 700 local ping_X = 950 local name_Y = 200 local namend_Y = 700 if ( not getKeyState ( "tab" ) ) then return end if ( name_Y > namend_Y ) then return end dxDrawRectangle(250, 100, 800, 600, tocolor(0, 100, 255, 150), false) dxDrawText("Belgium-Reallife", 250, 100, 1050, 200, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true, false, false) dxDrawLine(250, 200, 1050, 200, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(550, 200, 550, 700, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(850, 200, 850, 700, tocolor(255, 255, 255, 255), 1, false) --dxDrawText("Team1", 550, 200, 850, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) --dxDrawText("Ping1", 850, 200, 1050, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) for _, player in ipairs ( getElementsByType ( "player" ) ) do dxDrawText ( getPlayerName ( player ), name_X, name_Y, name_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) dxDrawText ( tostring ( getPlayerPing ( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) dxDrawText ( tostring ( getPlayerTeam( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) name_Y = ( name_Y + text_h * 1.5 ) end end ) @TAPL wouldn't this work too?
-
Will getTeamFromPlayer(player) also work?
-
Okay it works no problem
-
Could this work? for _, player in ipairs ( getElementsByType ( "player" ) ) do dxDrawText ( getPlayerPing(getLocalPlayer()), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "bankgothic" ) name_Y = ( name_Y + text_h * 1.5 ) end
