
qaisjp
Retired Staff-
Posts
2,344 -
Joined
-
Days Won
10
Everything posted by qaisjp
-
Go to freeroam server side, and remove the onPlayerChat event handler and its function.
-
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
-
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
-
I DID CHANGE. I removed the "Like" you don't need like.
-
Please show the new code. Your welcome
-
It's his job to make it easier for himself and everyone else. We shouldn't do the dirty work, he should.
-
... i dont understand the code you have made without proper indentation/tabulation
-
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
-
\resources\ underneath deathmatch.
-
FIRST TABULATE/INDENT YOUR CODE OR NOBODY WILL HELP YOU. caps was needed, sorry
-
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
-
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
-
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
-
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 )
-
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.
-
Don't do kickPlayer! Use cancelEvent, show MySQL_GetString function pls.
-
looooool The way you would normally do it.
-
You don't need to set the players parent resource. What kind of crazy idea do you have for that ?
-
You don't need to set the players parent resource. What kind of crazy idea do you have for that ?
-
Your method is lame, sorry to say.
-
What's so different in the new version as compared to the current version?
-
not even a funny joke.
-
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