Jump to content

GanJaRuleZ

Members
  • Posts

    298
  • Joined

  • Last visited

Everything posted by GanJaRuleZ

  1. Nope , the map starts , it outputs the following : It has average rating nil/10 (by 1 players) So in the debuscript 3 it gives that error ..
  2. It still doesen't saves ...
  3. Hai all , this is the last script-problem that i have for now local root = getRootElement() addEventHandler('onGamemodeMapStart', root, function( theMapStarts) local mapName = getMapName local theMapRate = call(getResourceFromName("mapratings"), "getMapRating", mapName) outputChatBox ("#CC0000*This map has a rate of ".. theMapRate .."!", 255,255,255, true) end ) ERROR: unzipped\mapratingsonmapstart\maprate.lua:6: attempt to concatenate local 'theMapRate' ( a boolean value )
  4. Ok no errors , but now the data doesen't saves...
  5. Ye , but it returns the following error.. ERROR: userpanel\server.lua:25: attempt to get length of global 'oldDate' (a nil value)
  6. Hai all , so after i tried the userpanel it gives me an error , and i can't solve it.. This is the ERROR ERROR: userpanel\server.lua:20: attempt to perform arithmetic on a nil value And after i type !stats 2 times It gives me the following error : ERROR: userpanel\server.lua:21: attempt to index fiel '?' (a nil value) So here is the script : function DestructionMoney2() local alivePlayers = getAlivePlayers() if info == "Destruction derby" then if #alivePlayers == 1 then local playername = getPlayerName(alivePlayers[1]) local serial = getPlayerSerial(alivePlayers[1]) local oldData = executeSQLSelect( "RaceStats", "RaceWins","serial = '" .. serial .. "'") newData = tonumber(oldData[1]["RaceWins"]) + 1 setElementData(alivePlayers[1], "RaceWins", tonumber(getElementData(alivePlayers[1], "RaceWins")) + 1) executeSQLUpdate("RaceStats", "RaceWins = '" .. newData .. "'","serial = '" .. serial .. "'") outputChatBox(getPlayerName(alivePlayers[1] ) .. " is the last player alive!", rootElement, 0, 255, 0) end end end addEventHandler("onPlayerWasted", getRootElement(), function() local serial = getPlayerSerial(source) local oldData = executeSQLSelect("RaceStats", "RaceLoses", "serial = '" .. serial .. "'") setElementData(source, "RaceLoses", tonumber(getElementData(source, "RaceLoses")) + 1) newData = tonumber(oldData[1]["RaceWins"]) + 1 executeSQLUpdate("RaceStats", "RaceLoses = '" .. newData.. "'","serial = '" .. serial .. "'") end) Thank you!
  7. Ye it works , thanks EDIT : When i click any of buttons nothing happens..
  8. Don't works and it doesn't outputs any error
  9. Ok , i forgot about this topic , This is the server side script. local theMarker = createMarker ( 2467.8647460938, -1648.7094726563, 12.47255897522, "cylinder", 1, 255, 255, 0, 170 ) function mission1Marker(marker,matchingDimension) if (matchingDimension) then triggerClientEvent ( source, "showMission1", source) end end addEventHandler("onPlayerMarkerHit",theMarker,mission1Marker) addEvent("rejectTheMission", true) addEventHandler("rejectTheMission", root, function () triggerClientEvent ( source, "unshowMission1", source ) end ) addEvent("acceptTheMission", true) addEventHandler("acceptTheMission", root, function() triggerClientEvent ( source, "unshowMission1", source ) end )
  10. addEventHandler ( "onPlayerDamage", getRootElement (), function(attacker, weapon, bodypart, loss) local thePlayer = getPlayerName ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( source ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setElementHealth ( thePlayer , 100 ) end end You can instead set his health to 100...
  11. Hi all. May i ask you something? What do you thing is the best method to save data ? Thank you
  12. Ok , the ped is created , the marker is there , but , when i hit the marker i don't see the gui...
  13. GanJaRuleZ

    [TUT] SQLite

    It's "The rock" from WWE , as far i know ON : Nice topic , i was a bit confused with the db's but now i can understand them , thx
  14. Actually it's client-side : <script src='Mission1.lua' type='client' />
  15. Hey all , i have a problem with a script Can anyone fix it? function createMissionPed() createPed ( 50 ,2467.9096679688, -1647.623046875, 13.469927787781, 184.5916595459 ) end addEventHandler ( "onResourceStart", getResourceRootElement(), createMissionPed ) infoMission1 = guiCreateWindow(239,172,364,326,"Mission 1",false) guiSetVisible ( infoMission1, false ) label1 = guiCreateLabel(13,24,339,18,"Hello , i have a problem. Can you help me?",false,infoMission1) guiLabelSetColor(label1,255,034,022) label2 = guiCreateLabel(10,67,147,36,"The Mission :",false,infoMission1) guiSetFont(label2,"sa-header") label3 = guiCreateLabel(73,112,283,26,"|OBJECTIVE| : Kill a person",false,infoMission1) guiSetFont(label3,"clear-normal") label4 = guiCreateLabel(73,139,272,22,"|REWARD| : 3000$ in CASH",false,infoMission1) buttonAccept = guiCreateButton(14,209,116,39,"I accept the job.",false,infoMission1) buttonReject = guiCreateButton(185,210,120,40,"I reject the job.",false,infoMission1) function guiSetVisibileTrue ( getRootElement() ) guiSetVisible ( infoMission1 , true ) end addEvent( "showMission1", true ) addEventHandler( "showMission1", getRootElement(), guiSetVisibleTrue ) function guiSetVisibleFalse ( getRootElement() ) guiSetVisible ( infoMission1 , false ) end addEvent( "unshowMission1", true ) addEventHandler( "unshowMission1", getRootElement(), guiSetVisibleFalse ) The error is: WARNINGG: Loading script failed: Mission\Mission1.lua:18: ')' expected near '(' So can anyone help me? Thanks in advance
  16. Just post your current script here...
  17. Since , it would to laggy , because the sounds loops everytime , making a huge lag. Just make one to start when someone is just under 10 HP ..
  18. But i don't wrote that is mine... I edited it , now i don't want to have argues with nobody on this forum .. So please just ONTOPIC ..
  19. I writed the --'s But hopeless , i see that some guys , don't understand that i didn't claimed as my own , i don't know his name on this forum , that's why i don't put credits there , anyway if anyone wants to talk to him , just pm me
  20. function lowHealth() local health = getElementHealth ( source ) if health <= 10 then for i=1;1000 do playSound("sounds/heart.mp3",false) end addEventHandler ( "onClientPlayerWasted", localPlayer, function lowHealth() ) function deadPlayer( thePlayer) if ( isPedDead ( thePlayer ) ) then stopSound("sounds/heart.mp3",false) end Now wait for a experienced scripter to find my mistakes ( if there are , but i'm sure it isn't perfect )
×
×
  • Create New...