Jump to content

bosslorenz

Members
  • Posts

    200
  • Joined

  • Last visited

Details

  • Gang
    Ballas

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

bosslorenz's Achievements

Chump

Chump (17/54)

1

Reputation

  1. What bounce do you mean, bouncing up down only or bouncing that changes x, y?
  2. How can we even make the script work for you, tell us if your group system have export functions. If yes, then put it here.
  3. It is because you did not put limitations on who can enter that command. Check your group system for getting the Gang of the account who enters that command.
  4. function onCrimKill (ammo, attacker, weapon, bodypart) local police = getTeamFromName("Police Officer") local crim = getTeamFromName("Criminals") local criminal = getPlayerWantedLevel(source) if ( getElementType (attacker) == "player" ) then if getPlayerTeam(attacker) == "police" and getPlayerTeam(source) == "crim" then if criminal > 0 then outputChatBox("You are arrested",source,255,0,0) outputChatBox("You earned money killing a wanted person",attacker,255,0,0) return end outputChatBox("Police mistaken, killed you unwanted",source,255,0,0) elseif getPlayerTeam(attacker) ~= "police" and getPlayerTeam(source) == "crim" then outputChatBox("You are not permitted to kill a criminal",attacker,255,0,0) elseif getPlayerTeam(attacker) == "police" and getPlayerTeam(source) ~= "crim" then outputChatBox("You cant killed a non-criminal player",attacker,255,0,0) else end end end addEventHandler("onPlayerWasted", getRootElement(), onCrimKill) I have made another to check attacker = team and playerWasted = team 1) Doesnt return outputChatBox when doing all option. 2) Also if attacker and playerWasted both are non of those teams the end. Can someone help?
  5. Have tried this also, no errors. Tried; being police and killed crim(unwanted) = You are not permitted to kill a criminal being police and killed crim(wanted) = You are not permitted to kill a criminal being non-police and killer crim(wanted) & crim(unwanted) = You are not permitted to kill a criminal
  6. [2016-08-02 18:56:19] SCRIPT ERROR: PH\(PH)PoliceJob\police_arrest.lua:13: 'end' expected (to close 'if' at line 6) near 'elseif' [2016-08-02 18:56:19] ERROR: Loading script failed: PH\(PH)PoliceJob\police_arrest.lua:13: 'end' expected (to close 'if' at line 6) near 'elseif' function onCrimKill (ammo, attacker, weapon, bodypart) local police = getTeamFromName("Police Officer") local criminal = getElementType(source) if ( getElementType (attacker) == "player" ) then if (attacker) then if attacker == police then if criminal > 0 then outputChatBox("You are arrested",source,255,0,0) return end outputChatBox("Police mistaken, killed you unwanted",source,255,0,0) else outputChatBox("You are not permitted to kill a criminal",attacker,255,0,0) elseif not attacker then outputChatBox(getPlayerName ( source ).."died from environment") end end end end addEventHandler("onPlayerWasted", getRootElement(), onCrimKill) I have attacker == police then. Then I want to check the wantedLevel of the wasted crim. If crim has > 0 WL then arrest elseif the crim not wanted then output to crim (You are mistaken killed by a police). Else if attacker of crim is not on police team then output to Killer (You cant kill crim) while if there is no attacker then output all (Player(killed) getName is killed through environment hazards. I dont know have much scripting knowledge if the (IF argument gets higher than 2 ) Someone help me?
  7. Now I can test my scripts. Just worked on VMWare and now I am using 2 mtasa on 1 computer
  8. function startBR() brEnt = createMarker(1570.2,-1337.7,17,"arrow",1,0,255,0,255) outputChatBox("Bank is now open, you can rob it for 1 minute") setTimer(destroyElement,60000,1,brEnt) end addCommandHandler("br",startBR) So I have made this marker (entrance to bank rob), and disappears after 1 minute. 1) But what eventHandler should I use for it to start the function as soon as the server starts?
  9. Maybe I will just change the idea since it is too complicated . The one I have to put setTimer and destroys is the marker entrance. The rob marker will just stay then.
  10. setTimer(function() marker1 = createMarker(1201,-1340,12.2,"cylinder",2,255,0,0,255) end,30000,0) Here I made this but the other function addEventHandler("onMarkerHit",marker1,bankRobStart) Error expected element on argument 2, got nil. Since I made the marker inside the setTimer function. the marker1 on argument 2 cant be called.
  11. marker1 = createMarker(1201,-1340,12.2,"cylinder",2,255,0,0,255) function bankRobStart(player) local getPTeam = getTeamFromName("Criminals") local playerTeam = getPlayerTeam(player) if playerTeam == getPTeam then if getElementType(player) == "player" then outputChatBox("Stay on the marker for 5 seconds to finish bank robbing", player, 255,0,0) theTime = setTimer (function() givePlayerMoney(player, 50) end, 5000, 0) end else outputChatBox("You are not criminal", player, 255, 0, 0) end end addEventHandler("onMarkerHit",marker1,bankRobStart) function killTime() if isTimer(theTime) then killTimer(theTime) end end addEventHandler("onMarkerLeave", marker1, killTime) addEventHandler("onPlayerQuit", getRootElement(), killTime) addEventHandler("onPlayerWasted", getRootElement(), killTime) Example marker1. Available for 10minutes. After that it gets destroy. Again, after 20 minutes from destruction. It spawns again for 10minutes. Need some help here.
  12. bosslorenz

    Inventory

    Is it possible to create an inventory system for Roleplay with just guiWindow? And then the items on gridlist. Example Gridlist has two Columns. 1) Item name and 2) Item pieces. Well the Item names are like constant. All I want is that when I make a setElementData, it will change the text on (item pieces)
  13. vehController is the player, it must work lol It must work lol? It doesnt even help me, your codes gives more error in fact, I didn't even said I had error in my line hitElement = getVehicleController ( hitElement ); What I ask is that in getElementType (hitElement) =="player" it returns error of peds so the problem is only on (hitElement)=="ped" .
  14. vehController is the player, it must work lol As If I didn't tried your code. Your code gives more error. The moveObject doesnt even work anymore. BTW, I just managed to make it work by putting this on first line of every function. if getElementType( hitElement ) == "ped" then return end
×
×
  • Create New...