
arris
Members-
Posts
24 -
Joined
-
Last visited
Everything posted by arris
-
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
-
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
-
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
-
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"
-
Hi does anyone how to make a script that if a player swear he gets a warning and after 3 warning he gets kicked
-
no the cursor moves but you can't click anything and its happening to everyone
-
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.
-
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.
-
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
-
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.
-
i tried what you guys said but it still doesn't work
-
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
-
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 )
-
I did look and i found somethings but i didn't need those and so thats why i asked.
-
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
-
umm so where do i add the takePlayerMoney line
-
ok so i made a menu and i added a button and when a player clicks it, it fixes the players car and the thing i want to do is when they click the button it cost $200 to fix the car. can someone help me.
-
Hey everyone i made a server on MTA:SA DM and its called "KZ official Killingzone". So i was wondering if people can come on and play and tell me what i should add and what i should get rid of.
-
can someone help me on, if a player buys a car that car is saved under there account and they can spawn it by pressing a button when ever they want. Also When a player is connecting to my server and downloading the gamemode they get a error of downloading the gamemode and it happens to everyone and they have to reconnect to download the gamemode and then it works. i can't find a way to fix that problem can someone help me with that.
-
The house system i have it spawns you at your house if you have one, on player connects. But the problem is when he dies he doesn't spawn at the house he spawns at the pirateboat.
-
When that player joins and he has a house he spawns there but when he dies he spawns at the pirateboat and that thing i want to do is if the player has a house they spawn there even if they die. I crated my own respawn that after you die it spawns you at the pirateboat.
-
Can some one help me scripting a spawn point of the player so if they have a house they spawn there or if they don't they spawn at the pirate ship. Also i did look in http://development.mtasa.com/ for that player respawn but it wasn't the one i wanted.
-
ok so i looked everywhere to find a player menu and i can not find it . So i was hoping if some on can script one for me and maybe other people. i have been on many servers and they have to same player menu. If you press the M key it will show/hide the player menu. At the top of the menu you can select various tabs.The tabs are called Player, Vehicle, Settings, Taxi and Account. In this player tab you can repair your vehicle or lock it or start/stop the engine. You can buy some quick health. You can take taxi's to different locations at the 'Taxi' tab for $200. You can change HUD settings on your screen at the 'Settings' tab. At the 'Account' tab you can see your vehicles and the buttons next to vehicles are spawn:you can spawn your car. boom:destroy your car and sell:sell your car. house and some small details.