Jump to content

BriGhtx3

Members
  • Posts

    378
  • Joined

  • Last visited

Everything posted by BriGhtx3

  1. Why is here an error? Debugscript doesn't say anything, and when i press F4 or type /handy, the image doesn't show oO function IPhone() local x,y = guiGetScreenSize() guiCreateStaticImage( 20,200, 229, 405, "bg.png", false ) end addCommandHandler("handy", IPhone) bindKey("F4", "down", IPhone)
  2. Thanks to both of you First I create my IPOD/Cellphone then a Speedometer.
  3. I want to ask how i can create a gui like this : 2. How do i create a speedometer? I want to make one by myself, but i don't know how to get the Player speed and to rotate the needle.
  4. No you don't have to do that -.- Just don't type it in the console. It says that it is the incorrect client type. Try to type it again in Ingame
  5. First if you want, that somebody scripts something for you, you'll probably have to pay. How you use it? Create a .lua file, and put its name in the meta.xml file (type="server")
  6. addEventHandler("onPlayerLogin",getRootElement(), function () local account = getPlayerAccount(source) local exp = getAccountData(account,"exp") if not exp then setAccountData(account,"exp",0) end end) function update(ammo, attacker, weapon, bodypart) local account = getPlayerAccount(killer) if account then local exp = getAccountData(account,"exp") setAccountData(account,"exp",exp+100) end end addEventHandler("onPlayerWasted",getRootElement(),update) What this Script will do : If you get killed, you get 100exp. If you want to edit it, that if you kill a Zombie then edit this line : addEventHandler("onPlayerWasted",getRootElement(),update) -- onPlayerWasted (you have to change this) Attention : I just edited Solidsnake14's Code!
  7. Edit : Sorry, didn't understand the question
  8. BriGhtx3

    GUI Problem

    addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiSetVisible(FGUI, false) showCursor(false) end) function fenster() FGUI = guiCreateWindow(287,118,241,371,"Fuehrerschein",false) Fbeenden = guiCreateButton(43,305,157,48,"Schliessen",false,FGUI) BarZahlen = guiCreateButton(43,243,157,48,"Bar (800$)",false,FGUI) FText = guiCreateLabel(14,32,213,123,"Hier kannst du nun einen \nFuehrerschein kaufen! Der \nFuehrerschein kostet 800$\nNach dem Kauf musst du einige\nFragen beantworten und dann eine\nStrecke fahren! Du kannst\nueber die Bank als auch Bar\nbezahlen!",false,FGUI) Bzahlen = guiCreateButton(43,179,157,48,"Bank (850$)",false,FGUI) guiSetVisible(FGUI, true) showCursor(true) end function Schliessen() guiSetVisible(FGUI, false) showCursor(false) end function Fuehrerkaufen(button,state) local player = getLocalPlayer() local schein = "1" local preis = "-800" if getPlayerMoney(player) >= 800 then if getElementData(player, "Scheine") == 0 then setElementData(player, "Schein", tonumber(schein)) givePlayerMoney ( player, tonumber(preis) ) else outputChatBox("Du hast schon einen Führerschein!",player,255,0,0) end else outputChatBox("Du kannst das nicht kaufen!",player) end end function FuehrerkaufenBank(button,state) local player = getLocalPlayer() local schein = "1" local preis = "-850" if getElementData(player, "Bank") >= 850 then if getElementData(player, "Scheine") == 0 then setElementData(player, "Schein", tonumber(schein)) setElementData(player, "Bank", tonumber(preis)) else outputChatBox("Du hast schon einen Führerschein!",player,255,0,0) end else outputChatBox("Du hast nicht genug Geld! Es kostet 800$",player,255,0,0) end end addCommandHandler ( "fuehrerscheingui", fenster ) addEventHandler("onClientGUIClick", Fbeenden, Schliessen) addEventHandler("onClientGUIClick", BarZahlen, Fuehrerkaufen) addEventHandler("onClientGUIClick", Bzahlen, FuehrerkaufenBank) When I type fuehrerscheingui the GUI shows, but the buttons won't work
  9. Gate1 = createObject ( 988, 0, 0, 10.64999961853, 0, 0, 358.5 ) function toogleGate(thePlayer,command) moveObject (Gate1, 4000, 2884.5769042969, 2097.2353515625, 5) end addCommandHandler ( "gate", toogleGate ) This will create a gate in the center of the map. If you type gate, it will move down.
  10. Yes this is one error. But not the one i am searching for. You see that it puts out Fehler, that means something with the mysql_num_rows is the error.
  11. spawnPlayer (source, x, y, z, rotation, skinid, interior, dimension, team) Set SkinID to 181 and, create a function, add a event with onPlayerWasted.
  12. The error is, the message is shown to every player, and not the one with this nmber
  13. There is not really an error, just it puts out : "Fehler!", "Erfolgreich angerufen!" AND "[Anruf] Du wurdest von " .. getPlayerName(thePlayer) .. " angerufen"
  14. Why don't you create the gate with the map editor, get out the position/rotation and then create a script which moves it?
  15. Here is the crap : function anrufen (thePlayer,commandName,Nummer,...) if Nummer then local result = mysql_query(sqlcon,"SELECT Username FROM user_data WHERE Nummer='"..Nummer.."';") if mysql_num_rows( result ) == 1 then row = mysql_fetch_row(result) else outputChatBox( "Fehler!", source ) end mysql_free_result(result) local anrufer = tonumber(row[1]) outputChatBox("Erfolgreich angerufen!", thePlayer, 255, 255, 0, true) outputChatBox("#00688B[Anruf] Du wurdest von " .. getPlayerName(thePlayer) .. "#00688B angerufen " , anrufer, 255, 255, 0, true) else outputChatBox("Benutzung: /anrufen [NUMMER]", thePlayer, 255, 0, 0, true) return false end end addCommandHandler("anrufen", anrufen) What this crap shall do : if you type /anrufen [number] this script should get out of the database the name of the player with this number. Then I should can chat with him. (is not done yet)
  16. BriGhtx3

    KickPlayer

    Won't work. My ACL : I work with a database. debugscript is also there but it says acces denied.
  17. BriGhtx3

    KickPlayer

    AdminCommand["kick"]=5 function kick ( thePlayer,commandName,ziel,... ) local kickw = { ... } local kickn = table.concat( kickw, " " ) local adminname = getPlayerFromName(thePlayer) if isAdmin( thePlayer, AdminCommand[string.lower(command)] ) then local kicked = getPlayerFromName ( ziel ) kickPlayer( kicked, kickn) else outputChatBox( "Du hast nicht das Recht dazu!", thePlayer ) end end addCommandHandler ( "kick", kick ) My Problem : The Player doesn't get kicked. There is no error message. ANOTHER PROBLEM : "acl denided for debugscript" What do I have to put in the acl or where do I have to put my name?
  18. Yes I found it right now. The PlayedM and H didn't return something. You converted it into a string.
  19. Yes it could be the worst code, becuase it is not really a queue I just wrote it very fast. If you write another 20-40 lines and a timer it could really be
  20. Or use variables. Set local queue = 0 if queue == 0 then outputChatbox("Hello") queue = 1 elseif queue == 1 outputChatBox("Hello two") queue = 2 elseif queue == 2 ... end
  21. If you use Binds, the numbers aren't on the numpad. Do you mean you want to script it?
×
×
  • Create New...