Jump to content

ville

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by ville

  1. Hi, i want to modify this script so polices can give tickets to criminals, i added that wanted line .. but its not working. I want to know what im doing wrong function mandat(player, cmd, who, ile) local who = getPlayerFromName(who) if getPlayerTeam(player) == getTeamFromName("Police") then takePlayerMoney(who, tonumber(ile)) outputChatBox("Player "..getPlayerName(who).." has been given ticket ("..tonumber(ile).."$)") end end addCommandHandler("ticket", mandat)
  2. players = getElementsByType("player") addEventHandler("onResourceStart", resourceRoot, function() for index,player in ipairs(players) do bindKey(player, "M","down", sirens) end end) function sirens(player) local veh = getPedOccupiedVehicle(player) if (veh) then addVehicleSirens(veh,1,1) if not getVehicleSirensOn (veh) then setVehicleSirensOn (veh, true) else setVehicleSirensOn (veh, false) removeVehicleSirens(veh) end end end I dont know.. I have 2 siren files need to replace like first when u turn firens on and the other siren when u pressing siren button
  3. Is there any way to replace police sirens wit hother sirens? I have mp3 files for the both siren, what i have to do now?
  4. ville

    Login video HELP

    Ohh sh*t i have great idea but no ;D
  5. Is there any way to put video to player screen when they join the server, and after login video then player can login?
  6. Oh nothing, thanks! its working fine
  7. Aand still players can be killed in greenzone...
  8. Players can still killed in greenzone
  9. i have little wantedoff thing, you can get your start rid with it. Now is there any way to disable jetpack and F1 while hawing wanted level? addCommandHandler("wantedoff", function(pSource) if getPlayerMoney(pSource) < 5000 then outputChatBox("* Police: You don't have enough money!", pSource, 255, 0, 0) return end outputChatBox("* Police: You are clear now.", pSource, 0,255,0) takePlayerMoney(pSource, 1000) setPlayerWantedLevel(pSource, 0) end )
  10. Aand the best thing is .. i dont really understand tables yet
  11. Thanks, but now i have problem.. if 2 players are doing plane mission sametime and one goes to finalmarker and gets his reward, then the other one goes and nothing happens
  12. i have done plane mission working correctly, but how can i do that the plane gets destroyed after finished mission? i have tried so many things missionMarker = createMarker ( -1626.1, -373.5, 13.4, "cylinder", 2, 0, 255, 255, 170 ) addEventHandler("onResourceStart", resourceRoot, function ( ) missionBlip = createBlipAttachedTo(missionMarker,53) outputChatBox( "[Plane Mission] Ota ammatti lähtölippu kuvakkelta.", player, 0, 255, 255 ) end ) addEventHandler("onMarkerHit", missionMarker, function ( hitElement ) if (getElementType ( hitElement ) == 'player' ) then local plane = createVehicle ( 519, -1654, -162, 14, 0, 0, -45 ) warpPedIntoVehicle ( hitElement, plane ) outputChatBox( "[Plane Mission] Lennä punaiselle lipulle.", hitElement, 0, 255, 255 ) finalMarker = createMarker ( 338, 2505, 16, "checkpoint", 6, 255, 255, 0, 170 ) finalBlip = createBlipAttachedTo(finalMarker,19) end end ) function Remove(thePlayer) if (getElementType(thePlayer) == "player") then if (finalMarker ~= nil) and (source == finalMarker) then if isElement(finalMarker) then givePlayerMoney ( thePlayer, 10000 ) removeEventHandler("onMarkerHit", finalMarker, Remove) destroyElement(finalMarker) outputChatBox( "[Plane Mission] Kiitos kun veit lentokoneen huoltoon. Saat 10K palkkiota.", hitElement, 0, 255, 255 ) end if isElement(finalBlip) then destroyElement(finalBlip) end end end end addEventHandler("onMarkerHit", getRootElement(), Remove)
  13. Hi, i have greenzone setted up right, but people can be killed from explosion and from long distance shooting.. Do i miss something.. Dont laugh at me i'm noob who tries to learn scripting x, y, size = -1997, 239, 120 local greenzone = createColRectangle ( -1997, 239, 110, 80 ) local greenzonemaparea = createRadarArea (-1997, 239, 110, 80, 0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit )
  14. Hello, i started making liquor and limonade storage robbery. Limonade storage works fine but then i cant rob liquor store? Can someone help me, im new in scripting.. function createRob() Marker = createMarker ( 1324.40,286.06,20, "cylinder", 1, 173, 255, 47, 170 ) setElementCollisionsEnabled( Marker, false ) bl = createBlipAttachedTo(Marker,56) outputChatBox( "Limonade storage robbary available!. Rob it from yellow dot blip.", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createRob) function createRob2() Marker = createMarker ( 1359.57,205.12,19, "cylinder", 1, 173, 255, 47, 170 ) setElementCollisionsEnabled( Marker, false ) bl = createBlipAttachedTo(Marker,49) outputChatBox( "Liquor store available!. Rob it from drink blip.", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createRob2) addEventHandler("onMarkerLeave",root, function ( player ) if ( source ~= Marker ) then return end if ( isPedInVehicle( player ) ) then return end local playerTeam = getPlayerTeam(player) if ( getTeamName(playerTeam) == "Criminal" ) then destroyElement( Marker ) destroyElement( bl ) randomMoney = math.random ( 5000, 15000 ) randomWanted = math.random ( 5, 6 ) givePlayerMoney(player,randomMoney) setPlayerWantedLevel ( player, randomWanted ) robPlayer = getPlayerName(player) outputChatBox("#ffffff[#00ff00ALARM!#ffffff] #c48027" .. robPlayer .. " #ff0000robbed liquor store/limonade store, and earned #00ff00" .. tostring(randomMoney) .."$ #ff0000and #00ff00" .. tostring(randomWanted) .. "#ff0000 starts.",root,0,255,0,true) setTimer( createRob, 600000, 1 ) else outputChatBox("#ffffff[#00ff00PROTIP#ffffff] #ff0000You need to be criminal!",player,0,255,0,true) end end )
  15. ville

    Panel?

    U mean normal players can use adminpanel or what?
  16. ville

    [HELP] Wantedoff

    Now its working! Thanks
  17. ville

    [HELP] Wantedoff

    Now it doesnt work at all.. I get on debugscript: attempt to compare nil with number
  18. Hi guys im new scripting but no im trying to make /wantedoff. It does change your wanted level to 0, it costs 1k. but i want to make it 1k for only player called Ville. i tested it and it worked for every player.. so can anyone help me addCommandHandler("wantedoff", function(pSource) if getAccountName(getPlayerAccount(player)) == "Ville" then elseif getPlayerMoney(pSource) < 1000 then outputChatBox("* Police: You don't have enough money!", pSource, 255, 0, 0) return end outputChatBox("* Police: You are clear now.", pSource, 0,255,0) takePlayerMoney(pSource, 1000) setPlayerWantedLevel(pSource, 0) end )
×
×
  • Create New...