Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. drk

    Need Scripter

    But MTA:SA Wiki don't have nothing about Lua, no? If he don't know nothing better start learning Lua.
  2. drk

    Need Scripter

    Better start learning here before MTA:SA Wiki: http://lua-users.org/wiki/TutorialDirectory
  3. I've not seen your post Sorry.
  4. https://wiki.multitheftauto.com/wiki/Mod ... ape_string This?
  5. X-SHADOW you don't need a function. Alex, go to your Admin Panel, click on Resources Tab, select your scoreboard and click "Configs", double click in "Allow color code in names" or something like this and set to true then press Ok and restart scoreboard.
  6. Open your mtaserver.conf and search for and set the limit.
  7. I'm not English too Buke and I learn Lua. It's not a problem.
  8. I have only fixed the error. Not changed all the code.
  9. adduser -home /home/user1 userName example: adduser -home /home/john john123 Then you need to complete a few things about the user. What you wrote?
  10. Nope. In Linux, to create FTP accounts you use system accounts.
  11. Commands: apt -get install proftpd-basic useradd -home /home/user1 username I don't remember if it's useradd ou adduser I don't use Debian now..
  12. function bastardDied( player_Wasted ) local rank = exports.race:getPlayerRank( player_Wasted ) if(rank == 2) then local pointsToDie = 5 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints + pointsToDie ) outputChatBox ( "#c0c0c0* #abcdef"..string.gsub(getPlayerName (player_Wasted),"#%x%x%x%x%x%x","").." #c0c0c0has finished this round in second place and got #abcdef5 #c0c0c0points!", root, 255, 255, 255, true ) elseif(rank == 3) then local pointsToDie = 3 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints + pointsToDie ) outputChatBox ( "#c0c0c0* #abcdef"..string.gsub(getPlayerName (player_Wasted),"#%x%x%x%x%x%x","").." #c0c0c0has finished this round in third place and got #abcdef3 #c0c0c0points!", root, 255, 255, 255, true ) elseif(rank == 4) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 5) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 6) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 7) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 9) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 10) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 11) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 12) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 13) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 14) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 15) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 16) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 17) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 18) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 19) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 20) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 21) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 22) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 23) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 24) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 25) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 26) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 27) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 28) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 29) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) elseif(rank == 30) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) end end addEventHandler("onPlayerWasted", getRootElement(), bastardDied)
  13. drk

    ID system

    https://wiki.multitheftauto.com/wiki/Main_Page http://lua-users.org/wiki/Tutorial_Directory getElementsByType setElementData addCommandHandler
  14. As far as I know, the function to add a column to scoreboard is addScoreboardColumn not scoreboardAddColumn.
  15. drk

    Nitro command

    You're welcome.
  16. drk

    Nitro command

    Change to: savePlayerData ( source, "points", points - cashToNos )
  17. drk

    Nitro command

    nitro = nil You are trying to savePlayerData of element "nitro".
  18. I think that he used WinAPI, yes.
  19. drk

    Some help

    But why need create a variable with a string "Taxi Driver" ?
  20. drk

    Some help

    LOL? Why create a variable with string "Taxi Driver" ? And why you need to do local job = getElementData ( hitElement, "Job", true ) if ( job == "Taxi Driver" ) then Mine is better: if ( getElementData ( hitElement, "Job", true ) == "Taxi Driver" ) then
  21. drk

    Some help

    LOL? So easy to see the problem. getElementData wrong arguments. local vehicleMarker1 = createMarker( x, y, z, 'cylinder', 1, 255, 255, 255, 150 ) function vehicleMarkerHit ( hitElement, matchingDimension ) if getElementType ( hitElement ) == "player" and not isPedInVehicle (hitElement) then if ( getElementData ( hitElement, "Job" ) == "Taxi Driver" ) then -- Maybe this is what you want local vehicle = createVehicle ( 420, x, y, z, 0, 0, 0 ) warpPedIntoVehicle(hitElement, vehicle) end end end addEventHandler( "onMarkerHit", vehicleMarker1 , vehicleMarkerHit )
  22. drk

    Nitro command

    function nitro(source, command) local points = getElementData(source,"points") if points >= 10 then if (isPedInVehicle(source)) then addVehicleUpgrade(getPedOccupiedVehicle(source), 1010) setTimer(outputChatBox,50,1,"#c0c0c0* #abcdef"..getPlayerName (source).." #c0c0c0bought nitro for #abcdef10#c0c0c0 points!",root, 255, 255, 255, true ) savePlayerData( nitro, "points", playerPoints - 10 ) else outputChatBox ("#c0c0c0* You must sit in a car to buy nitro it!",source, 255, 255, 255, true ) cancelEvent() end else outputChatBox ("#c0c0c0* You can't buy nitro, you need #abcdef10#c0c0c0 points first!",source, 255, 255, 255, true ) cancelEvent() end end addCommandHandler("nitro", nitro) addCommandHandler("nos", nitro) You are calling a nil function nos.
×
×
  • Create New...