Jump to content

arris

Members
  • Posts

    24
  • Joined

  • Last visited

Details

  • Gang
    KZ

arris's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. arris

    client side

    ok so i made two scritps they work but when i add the line takePlayerMoney it doesn't work heres the code and also this is all client side and its a guibutton function fixvehicle ( button, state ) if button == "left" and state == "down" then local clientPlayer = getLocalPlayer() if isPlayerInVehicle(clientPlayer) == true then local Vehicle = getPlayerOccupiedVehicle ( clientPlayer) fixVehicle(Vehicle) outputChatBox("Vehicle Successfully Fixed/Repaired",255,255,0,true) else outputChatBox("You are not in a vehicle",255,0,0,true) end end end and function fullhealth ( button, state ) if button == "left" and state == "down" then local client = getLocalPlayer() if getElementType(client)=="player" and getElementHealth(client)<= 75 then setElementHealth( client, 100 ) else outputChatBox("You Have More Then 75% Of Health!",255,0,0,true) end end end i want it to cost $200 but i can't find the right code
  2. So im been working on a player menu for a little while and the problem im having is when the player press m the menu doesn't come up. Does anybody know what code i should use and also this player menu is work in progress. heres the code Window = {} Button = {} function changeState( source ) if getGuiVisible(Window[1]) then getSetVisible(Window[1]),false showCursor(false) else Window[1] = guiCreateWindow(618,138,512,595,"Player Menu",false) Button[1] = guiCreateButton(0.7348,0.3395,0.2551,0.0627,"Fix Vehicle $200",true,Window[1]) Button[2] = guiCreateButton(0.7368,0.4225,0.2551,0.0627,"Full Health $200",true,Window[1]) Button[3] = guiCreateButton(0.7368,0.5074,0.2551,0.0627,"Suicide",true,Window[1]) Button[4] = guiCreateButton(0.6883,0.8764,0.2895,0.0978,"Close",true,Window[1]) guiSetFont(Button[4],"sa-header") Label[1] = guiCreateLabel(0.004,0.0018,0.6761,0.0886,"Killingzone RPG",true,Window[1]) guiLabelSetColor(Label[1],255,255,255) guiLabelSetVerticalAlign(Label[1],"top") guiLabelSetHorizontalAlign(Label[1],"left",false) guiSetFont(Label[1],"sa-header") Label[2] = guiCreateLabel(0.7571,0.6605,0.1356,0.0332,"Your Health",true,Window[1]) guiLabelSetColor(Label[2],255,255,255) guiLabelSetVerticalAlign(Label[2],"top") guiLabelSetHorizontalAlign(Label[2],"left",false) Label[3] = guiCreateLabel(0.753,0.7528,0.1559,0.0314,"Vehicle Health",true,Window[1]) guiLabelSetColor(Label[3],255,255,255) guiLabelSetVerticalAlign(Label[3],"top") guiLabelSetHorizontalAlign(Label[3],"left",false) Progress[1] = guiCreateProgressBar(0.6356,0.6919,0.3563,0.0406,true,Window[1]) Progress[2] = guiCreateProgressBar(0.6356,0.7786,0.3603,0.048,true,Window[1]) Memo[1]= guiCreateMemo(0.0385,0.1236,0.5668,0.2804,"Hello and Welcome to Killingzone RPG.\\n\\nIn this server you can buy house, cars, and even weapons.\\n\\nOwner:\\n[NRNS]Coolboy\\n\\nScripters:\\n[NRNS]Coolboy\\n**ArmGuy**G",true,Window[1]) guiMemoSetReadOnly(Memo[1],true) Memo[2] = guiCreateMemo(0.0466,0.4539,0.5648,0.3598,"Rules:\\n\\nThere is no hacking in this server you will be banned.\\n\\nRespeact other players.\\n",true,Window[1]) guiMemoSetReadOnly(Memo[2],true) guiWindowSetSizable(Window[1],false) addEventHandler ( "onClientGUIClick", Button[1], fix vehicle $200 ) addEventHandler ( "onClientGUIClick", Button[2], full health $200 ) addEventHandler ( "onClientGUIClick", Button[3], suicide ) addEventHandler ( "onClientGUIClick", Button[4], close ) guiSetVisible(Window[1],true) showCursor(true) end end addCommandHandler("cp",changeState) function onStart() bindKey ("m", "down", changeState ) end addEventHandler("onClientResourceStart",getRootElement(),onStart) function close(button,state) if button == "left" and state =="down" then if guiGetVisible(Window[1]) then guiSetVisible(Winow[1]),false showCursor(false) end end end
  3. when i downloaded it i only change the loc. of the banks and thats it and when i hover my mouse over it the buttons are solid and you have to disconnect to get out of the bank screen and also this is happening with another script also and i never touched that scritp
  4. arris

    Does anyone know

    swears = (All the swears are here) function chat() if outputChatBox ==(swears) and getElementType(source)=="player" then outputChatBox ("PLEASE DONT SWEAR ON NRNS SERVERS!!!!... U CAN GET KICKED/BANNED", 255, 0, 0 ) end end addEventHandler ("onPlayerChat",source, chat ) and i get this is what it says in the console "WARNING: swear.lua: Bad argument @ 'addEventHandler' -Line: 7"
  5. Hi does anyone how to make a script that if a player swear he gets a warning and after 3 warning he gets kicked
  6. no the cursor moves but you can't click anything and its happening to everyone
  7. ok i replaced it but i still get the same error. Then i found out that i had a copy of my server folder and i placed that and now it works but i still can't click on anything.
  8. I'm using MTA DP 2.3 deathmatch and so when the player walks into the bank marker he can't click on anything not even the quit button, hes like frozen at the spot and it started happening when i started my server it said "WARNING: bank.xml.server.lua: Bad argument @ 'xmlNodeFindSubNode' -line: 20" I don't know how to fix it.
  9. ok so i got the thing working when the player tries to enter the car but now when i put on the police skin i can't enter the car
  10. can someone help me when i walk into the bank marker the gui window popup but i can't click on anything its not working i can't even click on the quit button.
  11. i tried what you guys said but it still doesn't work
  12. thank you for the info im using mta dp 2.3 deathmatch. The thing im trying to do is when a police man with the skin police enters the car he stay in it but if the person doesn't have the police skin he gets kick out of the car
  13. Hi i have this code but it doesn't work and it doesn't even come up with errors can someone help me local policevehicles = { [407]=true, [416]=true, [425]=true, [427]=true, [428]=true, [432]=true, [433]=true, [470]=true, [490]=true, [523]=true, [528]=true, [544]=true, [596]=true, [597]=true, [598]=true, [599]=true, [601]=true } local policeskins = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true, [285]=true, [286]=true, [287]=true, [288]=true } function enterVehicle ( theVehicle, seat, jacked ) local skinID = getPlayerSkin ( source ) local vehID = getVehicleID ( theVehicle ) if policevehicles[vehID] and not policeskins[skinID] then removePlayerFromVehicle ( source ) outputChatBox ( "Only someones name can enter police car!", source ) end end addEventHandler ( "onPlayerEnterVehicle", getRootElement(), enterVehicle )
  14. arris

    Need help

    I did look and i found somethings but i didn't need those and so thats why i asked.
  15. arris

    Need help

    This is how i have it and it doesn't work function fix(button,state) --- BUTTON 1 local money = getPlayerMoney( player ) if money >= 200 then fixVehicle( vehicle ) takePlayerMoney( player, 200 ) else outputChatBox( "You need 200$ to repair your car", player, 255, 0, 0 ) end if button == "left" and state == "down" then local clientPlayer = getLocalPlayer() if isPlayerInVehicle(clientPlayer) == true then local Vehicle = getPlayerOccupiedVehicle ( clientPlayer) fixVehicle(Vehicle) outputChatBox("Vehicle Successfully Fixed/Repaired",255,255,0,true) else outputChatBox("You are not in a vehicle",255,0,0,true) end end end --- --- --- --- -- Also can someone help me with this code addEventHandler( "onPlayerWasted", getRootElement( ), function() setTimer( spawnPlayer, 5000, 1, source, 2001.6312255859, 1544.2255859375, 13.5859375 ) end ) i have that code but i want to create another code that if the player has a house he spawn there if he doesn't he spawns at 2001.6312255859, 1544.2255859375, 13.5859375 can someone help
×
×
  • Create New...