Jump to content

qaisjp

Retired Staff
  • Posts

    2,344
  • Joined

  • Days Won

    10

Everything posted by qaisjp

  1. Go to freeroam server side, and remove the onPlayerChat event handler and its function.
  2. https://community.multitheftauto.com/ind ... ils&id=445 https://community.multitheftauto.com/ind ... ls&id=2304 https://community.multitheftauto.com/ind ... ls&id=1475 https://community.multitheftauto.com/ind ... ls&id=1939 https://community.multitheftauto.com/ind ... ls&id=2147 https://community.multitheftauto.com/ind ... ls&id=3484 https://community.multitheftauto.com/ind ... ls&id=2149 https://community.multitheftauto.com/ind ... ls&id=4150
  3. function showSweeperGui(player) if (player == localPlayer) and (getElementData(source, "markerJOB") == "streetsweeper") then if (not isPedInVehicle(player) ) then triggerServerEvent("onPlayerToggleMouse", localPlayer) guiSetVisible(gui,true) return end local veh = getPedOccupiedVehicle(player) if getElementData(veh, "vehicleJOB") and getElementData(veh, "vehicleJOB") == "streetsweeper" then triggerServerEvent("onPlayerStopsStreetsweeperJob", player, totalSalary, veh) totalSalary = 0 killTimer(cleanerTimer) end end addEventHandler("onClientMarkerHit", root, showSweeperGui) this has a combination of both
  4. I DID CHANGE. I removed the "Like" you don't need like.
  5. qaisjp

    jail error

    It's his job to make it easier for himself and everyone else. We shouldn't do the dirty work, he should.
  6. qaisjp

    jail error

    ... i dont understand the code you have made without proper indentation/tabulation
  7. qaisjp

    script editor

    \mods\deathmatch\resources\
  8. qaisjp

    jail error

    function KillPeopleWhoDontTabulateOrIndent() for i, v in ipairs(getElementsByType"player") do while true do if getElementData(v, "indenter") then break end killPed(v) outputChatBox("You suck1!11111!!!!", v) if getElementData(v, "retarded") == true then kickPlayer(v) end break end end end addCommandHandler("retard", function() KillPeopleWhoDontTabulateOrIndent() end ) SPACES! Also use Locals
  9. qaisjp

    script editor

    \resources\ underneath deathmatch.
  10. qaisjp

    jail error

    FIRST TABULATE/INDENT YOUR CODE OR NOBODY WILL HELP YOU. caps was needed, sorry
  11. function bannCheck (nick, ip, username, serial) local bt = tonumber(MySQL_GetString("Bann", "user_data", "'"..nick.."'")) if bt then if bt > 0 then cancelEvent(true, "Du bist gebannt!") end end end addEventHandler("onPlayerConnect", getRootElement(), bannCheck) try this
  12. name = "me" message = "auhwsiurhairhweirmhweiryhmairhymisrysiryewimryemireymryieyrieryeiryeiryeiryeireiryeiryeiryeiry" local len = 1 local length = message:len() while len ~= length do len = len+1 if len == 50 and message~="" then print(name..": "..message:sub(len-50, len)) message = message:sub(len, length) len = 1 end end for #2
  13. message = "djmixcuma" message = message:gsub("^%l", string.upper) Second line should do #1 message = "auhwsiurhairhweirmhweiryhmairhymisrysiryewimryemireymryieyrieryeiryeiryeiryeireiryeiryeiryeiry" local len = 0 while len ~= message:len() do len = len+1 if len == 50 then message = message:sub(len-50, len) outputChatBox(name..": "..message) end end might do #2, untried and done right now off the top of my mind
  14. addEventHandler Root Element tree Anything you put as the second argument in triggerEvent is the source that you find in addEventHandler. The second argument of addEventHandler LIMITS the source and gives you specifics. For example: For all markers, including "supermarker" local supermarker = createMarker(0,0,0) addEventHandler("onColShapeHit", root, function() outputChatBox("hit a marker") end ) Different message for supermarker local supermarker = createMarker(0,0,0) addEventHandler("onColShapeHit", root, function() if source == supermarker then outputChatBox("hit supermarker") end outputChatBox("hit a marker") end ) Only for supermarker: local supermarker = createMarker(0,0,0) addEventHandler("onColShapeHit", supermarker, function() outputChatBox("supermarker hit") end ) Only tells the player that he hit the supermarker, in the dimension he is in: local supermarker = createMarker(0,0,0) addEventHandler("onColShapeHit", supermarker, function(p,d) if (getElementType(p)~="player") or (not d) then return end outputChatBox("you hit the supermarker", p) end )
  15. It's just a name, you can call it "cakeface" if you want, refer to the wiki for their actual values. For example, onColShapeHit has a source value that is a marker (source values have variable name "source" that can be changed if re-declared) and first argument is the hit element so: addEventHandler("onColShapeHit", root, function( hitElement ) outputChatBox( "A " .. getElementType(hitElement) .. " hit a " .. getElementType(source) ) end ) To redeclare the source and call it "marker" (in most cases you wont need to do this): addEventHandler("onColShapeHit", root, function( hitElement ) local marker = source outputChatBox( "A " .. getElementType(hitElement) .. " hit a " .. getElementType(marker) ) end ) Nearly all the time source is predefined, and client is manually defined (client = x, source is created by MTA) It depends on what the wiki says and what you call the variables.
  16. Don't do kickPlayer! Use cancelEvent, show MySQL_GetString function pls.
  17. looooool The way you would normally do it.
  18. You don't need to set the players parent resource. What kind of crazy idea do you have for that ?
  19. You don't need to set the players parent resource. What kind of crazy idea do you have for that ?
  20. What's so different in the new version as compared to the current version?
  21. which mate me or 50p or both. Yes 50p, he is doing this for his borderpatrol gamemode which is one resource, if you remove all element data, servers with other resources that use element data alongside BP GM will have problems
×
×
  • Create New...