Jump to content

Msypon

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by Msypon

  1. Msypon

    Armor

    whats the function to set armor?
  2. Msypon

    1 Min

    How to convert 60 secs to 1 min?
  3. Msypon

    Camera

    How to put camera on vehicle, it is not possible with setCameraTarget right?
  4. Msypon

    Modinfo

    No, for example i typed /modinfo Msypon and then shows on chat: Msypon gta3.img: car.txd; someskins.dff; bike.dff... Only the name of file modified without id, hush, size and others Like this:
  5. Msypon

    Modinfo

    Another question How to put only the name? Example: Msypon gta3.img> something.txd; something2.dff... Without id, hash...
  6. Msypon

    Modinfo

    Thank you alot cadu
  7. Msypon

    Modinfo

    Sorry it is not working but thanks anywat
  8. Msypon

    Modinfo

    So its impossible to make a /modinfo ?
  9. Msypon

    Modinfo

    I already saw this in other serves
  10. Msypon

    Modinfo

    I want to /modinfo But it doesnt work what is wrong? function handleOnPlayerModInfo ( source, cmd, target, filename, modList ) if ( target ) then local targetplayer = getPlayerFromName ( target ) outputChatBox( getPlayerName(targetplayer) .. " " .. filename ) for idx,mod in ipairs(modList) do local line = tostring(idx) .. ")" for k,v in pairs(mod) do line = line .. " " .. tostring(k) .. "=" .. tostring(v) end outputChatBox( line ) addEventHandler ( "onPlayerModInfo", getRootElement(), handleOnPlayerModInfo ) end end end addCommandHandler("modinfo",handleOnPlayerModInfo)
  11. Msypon

    Rules

    I'm trying to use the Rules script from MTA wiki, but it shows the error: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil] at Line 49 function createRulesWindow() -- get the screen width and height local sWidth, sHeight = guiGetScreenSize() -- create the window, using some maths to find the centre of the screen local Width,Height = 445,445 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) -- create the window and save the window gui element in a variable called 'rulesWindow' rulesWindow = guiCreateWindow(X,Y,Width,Height,"Rules",false) -- stop players from being able to simply move the window out of the way -- note that we use our 'rulesWindow' variable to make changes to the window guiWindowSetMovable(rulesWindow,false) -- stop players from being able to resize the window guiWindowSetSizable(rulesWindow,false) -- create the button and save the button gui element in a variable called 'rulesButton' rulesButton = guiCreateButton(137,394,158,37,"Accept",false,rulesWindow) -- create the label and save the label gui element in a variable called 'rulesLabel' -- we set the text of the label to our rules rulesLabel = guiCreateLabel(10,25,425,359,[[ Welcome to my MTA Server! Please carefully read the rules before accepting. By accepting the rules, you are agreeing to play by them. Anyone caught breaking these rules will be kicked and/or banned from this server. If you do not accept the rules within 90 seconds, you will be kicked. 1: No cheating. 2: No bug abuse. 3: No mods to your game. 4: No flaming. 5: Respect other players. 6: Be nice!]],false,rulesWindow) guiLabelSetHorizontalAlign(rulesLabel,"center",true) end addEventHandler("onClientGUIClick", rulesButton, acceptRules, false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- call the createRulesWindow function to create our gui createRulesWindow() -- show the cursor to the player showCursor(true,true) end ) function inactivePlayer(status) -- if status is 1 (this means it is the first warning) if status == 1 then -- output a warning outputChatBox("Please accept our rules or be kicked.") -- set another timer to call inactivePlayer in another 30 seconds, with "2" as an argument rulesWarningTimer = setTimer(inactivePlayer,30000,1,2) -- if status is 2 (the second warning) elseif status == 2 then -- output a final warning outputChatBox("FINAL WARNING: Please accept our rules or be kicked.") -- set a final timer to call inactivePlayer in another 30 seconds, with "3" as an argument rulesWarningTimer = setTimer(inactivePlayer,30000,1,3) elseif status == 3 then -- trigger the server so we can kick the player triggerServerEvent("clientKickInactivePlayer",getLocalPlayer()) end end function acceptRules(button,state) -- if our accept button was clicked with the left mouse button, and the state of the mouse button is up if button == "left" and state == "up" then -- hide the window and all the components guiSetVisible(rulesWindow, false) -- hide the mouse cursor showCursor(false,false) -- output a message to the player outputChatBox("Thank you for accepting our rules. Have fun!") -- if the warning timer exists if rulesWarningTimer then -- stop the timer and set the variable to nil -- this is the timer used to kick players who do not accept the rules. We will cover this in more detail in the next section. killTimer(rulesWarningTimer) rulesWarningTimer = nil end end end
  12. Msypon

    Comma

    How to add comma in money value?
  13. Msypon

    Image button

    How to do it? I tried with guieditor but i didnt understand
  14. Msypon

    Image button

    Thanks, another question: how to add image on progress bar?
  15. Msypon

    Image button

    What functions do i need to create a button as image?
  16. nvm, i fixed it I changed this triggerServerEvent("CTheVehicle",root,theselectedveh,x,y,z) to this triggerServerEvent("CTheVehicle",localPlayer,theselectedveh,x,y,z) Thanks anyway
  17. Why this is not working? vehicle = { } function theVehicle(id,x,y,z) if id and x and y and z then if ( isElement ( vehicle [ source ] ) ) then destroyElement ( vehicle [ source ] ) end end vehicle [ source ] = createVehicle (id,x,y,z) setTimer ( warpPedIntoVehicle, 200, 1, source, vehicle [ source ] ) end addEvent("CTheVehicle",true) addEventHandler("CTheVehicle",root,theVehicle) WARNING: createveh\server.lua:10 Bad 'ped' pointer @ 'warpPedIntoVehicle' <1>
  18. Is there a way to change this text?
  19. Msypon

    Center

    Thanks thanks dude u are the best :D:D
  20. Msypon

    Center

    How to put this text on center with color code? DELETED
  21. How to put this text on center for all the resolutions? sWidth, sHeight = guiGetScreenSize() dxDrawText(text, sWidth-695,sHeight-395,sWidth-615,sHeight-366,tocolor(255,255,255,255),1.0,"bankgothic","center","top",false,false,false)
  22. Msypon

    Kick ID

    What is wrong? function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason ) local kicked = getElementData(sourcePlayer, "ID") if ( hasObjectPermissionTo ( sourcePlayer, "function.kickPlayer" ) ) then if kicked then kickPlayer ( kicked, sourcePlayer, reason ) end end end addCommandHandler ( "kickid", kickPlayerHandler ) /debugscript 3 WARNING: kick\server.lua:5: Bad argument @ 'kickPlayer'
  23. Okay working thank you alot
×
×
  • Create New...