Jump to content

BriGhtx3

Members
  • Posts

    378
  • Joined

  • Last visited

Everything posted by BriGhtx3

  1. local Police = createTeam("Police", 0, 0, 255) local teamMarker = createMarker(1553.33, -1677.37, 15.382, 'cylinder', 1.0, 0, 0, 255, 150 ) function teamMarkerHit( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then if getPlayerTeam" class="kw2">getPlayerTeam" class="kw2">getPlayerTeam (hitElement) == Police then outputChatBox("You are already in this team", thePlayer) else setPlayerTeam" class="kw6">setPlayerTeam ( hitElement, Police) setPlayerSkin( hitElement, 280) giveWeapon ( hitElement, 3, 1, true ) giveWeapon ( hitElement, 22, 148, true ) giveWeapon ( hitElement, 29, 64, true ) giveWeapon ( hitElement, 25, 10, true ) end end end addEventHandler( "onMarkerHit", teamMarker , teamMarkerHit )
  2. I think you don't understand -.- : Hello, TFC's MTA:RP server needs some other scripters
  3. I don't want to be rude (i am not really better) but after i see this : viewtopic.php?f=91&t=33524 I would say you are not good enough.
  4. Yes but you wouldn't have to ask if you would read tutorials.
  5. -.- Then create this column? You should really read some tutorials about SQL.
  6. Try it now again : CREATE TABLE Userdata ( Username VARCHAR (100) );
  7. Try to use an LUA Editor, like LuaEdit or LUA Scite (recommend)
  8. You have to query this in your database and not in the script
  9. CREATE TABLE Userdata ( Username VARCHAR (100) ); Query this.
  10. I would say it is time to learn. it says to you LENGTH AND DECIMAL. What don't you understand?
  11. Then just create the table?
  12. ? What is the error? In the table userdata, isn't another table?
  13. local result = mysql_query(handler, "INSERT INTO player SET Name='"..mysql_escape_string(handler, Name).."', Password='"..md5(password).."';") mysql_free_result(result) I noticed that you worked with pawn, when i saw this ^^ : #define MySQL_HOST "localhost" #define MySQL_USER "root" #define MySQL_PASS "" #define MySQL_DATA "fr"
  14. local result = mysql_query(handler,"SELECT * FROM players WHERE Name='"..mysql_escape_string( handler, name ).."';") if result then rows = mysql_num_rows(result) if rows == 1 then row = mysql_fetch_row(result) end mysql_free_result(result) end
  15. BriGhtx3

    Problems

    It is time to learn... https://wiki.multitheftauto.com/wiki/Scr ... troduction
  16. Because your resource needs adminrights, to kick a player
  17. Into Group "Admin" : <object name="resource.NAMEOFRESOURCE" /> <!-- I would prefer <object name="resource.*" /> because then you don't have to add each resource --> Edit : Changed Syntax Highlighting
  18. I tested it and it works. Try to delete your script and paste the one of Aibo
  19. This should work : function checkname() local x = 222.1 local y = 124.1 local z = 2.0 local name = getPlayerName(source) if (name == "Player5345") then kickPlayer(source,"Bad Name") else spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Hello " ..getPlayerName(source).. " Welcome To test server",source) end end addEventHandler("onPlayerJoin",getRootElement(), checkname)
  20. BriGhtx3

    Gridlist

    Doesn't show anyway for do -- WHAT DO I HAVE TO TYPE IN HERE? local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, boni, "Hello", false, false ) end I think this could be one error.
  21. BriGhtx3

    Gridlist

    function bonusmenuegui() GUIEditor_Button = {} GUIEditor_Grid = {} BonusmenueGui = guiCreateWindow(361,203,318,353,"Bonusmenue",false) GUIEditor_Grid[1] = guiCreateGridList(9,28,212,307,false,BonusmenueGui) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Bonus",0.2) guiGridListAddColumn(GUIEditor_Grid[1],"Status",0.2) for i = 1,14 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemText(GUIEditor_Grid[1],0,1,"") guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Kampfstil") guiGridListSetItemText(GUIEditor_Grid[1],2,1,"Boxen[10]") guiGridListSetItemText(GUIEditor_Grid[1],3,1,"Taek-Kwon-Do[15]") guiGridListSetItemText(GUIEditor_Grid[1],4,1,"Streetfighting[20]") guiGridListSetItemText(GUIEditor_Grid[1],5,1,"-----------------------------------------------------------------") guiGridListSetItemText(GUIEditor_Grid[1],6,1,"Lizensen") guiGridListSetItemText(GUIEditor_Grid[1],7,1,"Gewerbungslizens[20]") guiGridListSetItemText(GUIEditor_Grid[1],8,1,"Freikaufslizens[10]") guiGridListSetItemText(GUIEditor_Grid[1],9,1,"Beamtenlizens[10]") guiGridListSetItemText(GUIEditor_Grid[1],10,1,"---------------------------------------------------") guiGridListSetItemText(GUIEditor_Grid[1],11,1,"Waffenskills") guiGridListSetItemText(GUIEditor_Grid[1],12,1,"M4[20]") guiGridListSetItemText(GUIEditor_Grid[1],13,1,"MP5[15]") guiGridListSetItemText(GUIEditor_Grid[1],0,2,"") guiGridListSetItemText(GUIEditor_Grid[1],1,2,"") guiGridListSetItemText(GUIEditor_Grid[1],2,2,"[]") guiGridListSetItemText(GUIEditor_Grid[1],3,2,"[]") guiGridListSetItemText(GUIEditor_Grid[1],4,2,"[]") guiGridListSetItemText(GUIEditor_Grid[1],5,2,"------------------------------------------") guiGridListSetItemText(GUIEditor_Grid[1],6,2,"") guiGridListSetItemText(GUIEditor_Grid[1],7,2,"[]") guiGridListSetItemText(GUIEditor_Grid[1],8,2,"[]") guiGridListSetItemText(GUIEditor_Grid[1],9,2,"[]") guiGridListSetItemText(GUIEditor_Grid[1],10,2,"----------------------------------------------") guiGridListSetItemText(GUIEditor_Grid[1],11,2,"") guiGridListSetItemText(GUIEditor_Grid[1],12,2,"[]") guiGridListSetItemText(GUIEditor_Grid[1],13,2,"[]") BMKaufen = guiCreateButton(231,283,76,23,"Kaufen",false,BonusmenueGui) BMSchliesen = guiCreateButton(232,318,75,23,"Schliessen",false,BonusmenueGui) addEventHandler("onClientGUIClick", BMSchliesen, BMSchliessen) end The Gridlist Items don't show. I don't know why oO I used the GUI Editor
  22. Now just a part works. It doesn't matter whether you played less than 3 hours or not. The message outputs everytime.
  23. function schaden ( attacker, weapon, bodypart, loss ) if attacker then if getElementType ( attacker ) == "vehicle" then cancelEvent() else local player1 = getPlayerName(attacker) local player = getPlayerName(source) local spielzeit = getElementData(thePlayer, "PlayedH") local mindestzeit = 3 if tostring(spielzeit) < tostring(mindestzeit) then outputChatBox("Du kannst ihn nicht verletzen!", 255, 0, 0, attacker) outputChatBox("Du kannst nicht verletzt werden!", 255, 0, 0, player) setElementHealth(player, 100) setElementHealth(player, getElementHealth(player)-5) end end end end addEventHandler ( "onPlayerDamage", getRootElement(), schaden) What this script should do. It checks if the attacker or victim has played more than 3 hours and if not, the victim will get 100% health and the attacker -5. But it doesn't do. WARNING : BAD ARGUMENT @ GETELEMENTDATA The PlayedH is defined.
  24. What do you mean? Edit : I added onClientResourceStart, and I didn't see it too. I think the position is wrong. But why? Edit 2 : Got it! phone = guiCreateStaticImage( screenWidth/2 - 299, screenHeight - 380, 229, 405, "bg.png", false ) My error? The client.lua file was in the Handy folder. The image too. In the meta the image is in the handy folder but in the code is written : bg.png. The paths weren't the same but both right. And now : How do I hide it?
×
×
  • Create New...