Jump to content

-ffs-AbodyRulez

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by -ffs-AbodyRulez

  1. Try this: function vehicleGodMod(player) if not tonumber(getElementData(player,"Stafftag")) >= 4 then outputChatBox("You dont have permission for this command!",player,255) else if (isVehicleDamageProof(getPedOccupiedVehicle(player))) then setVehicleDamageProof(getPedOccupiedVehicle(player),false) outputChatBox("Vehicle god mode disabled",player,255) else setVehicleDamageProof(getPedOccupiedVehicle(player),true) outputChatBox("Vehicle god mode enabled",player,0,255) end end end addCommandHandler("vgod",vehicleGodMod) addCommandHandler("vehiclegod",vehicleGodMod) Make sure to be logged in.
  2. I've created a function in Client side which will return true or false in some case. Is there any possible way that if a server sided function called that client function "using triggerClientEvent() most probably" to get the returned value from that client function?? For example: -- Server side local clientFunctionFlag = triggerClientEvent("blablab", source) anything like this?
  3. Thanks HyPeX Tete, your code works fine, but how do i adjust it to make a new line when reaching a space after 11 character ? (So it won't divide a word in the 9th character for example)
  4. Thank you Tete, i didn't understand your code actually, but i've tried something and it worked for me i guess. text = 1234567890 text = string.sub(text,1, 4).."\n"..string.sub(text, 5, string.len(text)) outputChatBox(text) --[[ output : 1234 567890 --]]
  5. xXMADEXx the for loop is totally not my problem.. the problem is -- your code part
  6. For a start I've created a function but i'm not sure how to finish it. function separatingLine(text) for(i = 0; i < string(text); i++){ if( string(text) > 10) then } end
  7. Wait i'm a bit lost here.. if (string(text) > 10) then text = text.."\n" ?
  8. I'm scripting a GUI memo, but i want when someone inserts a string that contains maybe more than 10 words to separate them in a new line. For example the user entered this input: "Hello my name is Abdullah and i'm a member in ffs community." a for loop that will count the spaces if they == 11 and separate with a new line \n, so the output should be: "Hello my name is Abdullah and i'm a member in ffs community." thank you.
  9. markerpv = createMarker( 1566.9652099609, -1610.640625, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) markerpv = createMarker( 3112.8000488281, -703.59997558594, 10.5, "cylinder", 2, 0, 0, 255, 255 ) markerpv = createMarker( 2256.3000488281, 2443.8999023438, 10.800000190735, "cylinder", 2, 0, 0, 255, 255 ) markerpv = createMarker( -1599.8000488281, 651.79998779297, 7.1999998092651, "cylinder", 2, 0, 0, 255, 255 ) wtf is this? marker is being created and deleted 4 times? Use different variables markerpv_1 = createMarker( 1566.9652099609, -1610.640625, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) markerpv_2 = createMarker( 3112.8000488281, -703.59997558594, 10.5, "cylinder", 2, 0, 0, 255, 255 ) markerpv_3 = createMarker( 2256.3000488281, 2443.8999023438, 10.800000190735, "cylinder", 2, 0, 0, 255, 255 ) markerpv_4 = createMarker( -1599.8000488281, 651.79998779297, 7.1999998092651, "cylinder", 2, 0, 0, 255, 255 )
  10. Use a flag that equals 0, and changes to 1 if createVehicle == true function car ( thePlayer, command ) if flag == 1 then return end local flag = 0 local x, y, z = getElementPosition ( thePlayer ) local flag_bool = createVehicle ( 432, x, y, z + 10 ) if flag_bool == true then flag = 1 end end addCommandHandler ( "createtank", car )
  11. addEvent("onWins", true) function screenwinning(Player) x, y = guiGetScreenSize() xR, xG, xB = getTeamColor(getPlayerTeam(Player)) winner = dxText:create(""..getTeamName(getPlayerTeam(Player)).." #FFFFFF has won a point!", x / 2, y / 2.8, false, "default-bold", 3, "center") winner:type('shadow', 1, xR, xG, xB, 175) timerTime = 5 setTimer(function()winner:visible(false)end, 5500, 1) end addEventHandler("onWins", getRootElement(),screenwinning) I need the player source, i tried if player ~= source then return end and it really returned end >.>
  12. By WhiteWarrior. "Its hard to amaze people. While creating this map, we were focusing on the ideas which are new and which really work. We took all the best things from our previous maps, upgraded and added something new. It brings the whole new style, the style of Dark Glare II." © WW Enjoy! ⭑ Track: ▷ AbodyRulez: 00:31 - 2:03 ▷ WW: 2:04 - 3:44 ⭑ Decorations: ▷ 00:30 - 00:47 (Abody with WW's touch) ▷ 00:47 - 1:00 (Abody) ▷ 1:00 - 1:08 (WW with Abody's touch) ▷ 1:08 - 1:16 (Both) ▷ 1:16 - 1:55 (Abody), 1:25 - 1:35 (Abody with WW's touch) ▷ 1:55 - 3:44 (WW) ⭑ Scripts: ▷ 0:55 - 0:56 - Abody's idea (Scripted by Abody) ▷ 1:39 - 1:41 - Abody's idea (Scripted by Abody) ▷ 3:36 - 3:38 - WW's idea (Scripted by Abody) ⭑ Credits: ▷ Song: T-Mass - Black Mountains Available to buy now: http://ukf.me/15z4gg1 Like T-Mass: https://www.facebook.com/TMassOfficial Follow T-Mass: https://twitter.com/TMass5 ▷ Infernus: Micra's v.5 ▷ LED Lights: Axo ⭑ Facebook: WhiteWarrior811 ⭑ Skype: WhiteWarriorTV Best wishes, WW.
  13. You lost me if marker == hitplayer or matchingDimension == true How come it makes no sense?
  14. Bad argument @ triggerClientEvent [expected string at argument 1, got nil]
  15. I made a script to move an object from point A to point B, it works well when addEventHander is attached to root, but i don't want this moving object(event) to be seen by anyone else but the one who triggered event, so i tried replacing getRootElement() with getLocalPlayer() but its not working, any help? marker = createMarker(-840.2998046875, -3680.599609375, 44.299999237061) hitPlayer = getLocalPlayer() function shadesMagic(hitPlayer, matchingDimension) if marker == hitPlayer or matchingDimension then block_1 = createObject(3095,-808.7998046875,-3623.5,52.200000762939,0,146.99157714844,0) moveObject(block_1,600,-835.7998046875,-3623.5,43.200000762939,0,33.00842285156,0) end end addEventHandler("onClientMarkerHit", getLocalPlayer(), shadesMagic)
  16. Yea i used a flag = {} and did a check if it was == 1 then return end, after codes set to 1, onMapStarting set back to nil. Thanks for answering though
  17. I've made a script that would notify players that a cretin player reached hunter, but when a player actually reaches hunter, the script will output "Player has reached hunter" more than one time, this happens if the [DM] map had more than 1 hunter at end, i'm thinking of a table with 1 entry each map, but i can't get to think of a scripting solution, any ideas ?
  18. Didn't work Snake. I'm a C programmer and pretty new to Lua, what i found out that Lua got a weird thing on its language == false == 0 == false or 0 < This will never work on getAccountData Not sure if its a bug or probably my mistake, thanks anyway
  19. It didn't work, it only destroyed the last checkpoint created, but others were kept the same
  20. I already use a nickname with no color codes or anything, that's totally not the mistake
  21. function HunterInfo(source, hunters, person) if person == nil and getAccountData(getPlayerAccount(source),"hunter.counts") == false then outputChatBox("#FFFFFFYou did not reach the Hunter yet.", source, 255,255,255,true) elseif person == nil and getAccountData(getPlayerAccount(source),"hunter.counts") == 1 then outputChatBox("#FFFFFFYou have reached the Hunter#FF0000 "..getAccountData(getPlayerAccount(source),"hunter.counts").." #FFFFFFtime.",source,255,255,255,true) elseif person == nil and getAccountData(getPlayerAccount(source),"hunter.counts") > 1 then outputChatBox("#FFFFFFYou have reached the Hunter#FF0000 "..getAccountData(getPlayerAccount(source),"hunter.counts").." #FFFFFFtimes.",source,255,255,255,true) elseif getAccountData(getPlayerAccount(getPlayerFromName(person)),"hunter.counts") == false then outputChatBox(getPlayerName(getPlayerFromName(person)).." #FFFFFFdid not reach the Hunter yet.", source, 255, 255, 255,true) elseif getAccountData(getPlayerAccount(getPlayerFromName(person)),"hunter.counts") == 1 then outputChatBox(getPlayerName(getPlayerFromName(person)).." #FFFFFFhas reached the Hunter #FF0000"..getAccountData(getPlayerAccount(getPlayerFromName(person)),"hunter.counts").." #FFFFFFtime.", source, 255, 255, 255,true) elseif getAccountData(getPlayerAccount(getPlayerFromName(person)),"hunter.counts") > 1 then outputChatBox(getPlayerName(getPlayerFromName(person)).." #FFFFFFhas reached the Hunter #FF0000"..getAccountData(getPlayerAccount(getPlayerFromName(person)),"hunter.counts").." #FFFFFFtimes.", source, 255, 255, 255,true) else outputChatBox("Sytanx: /hunters [Player]", source, 255, 0, 0,false) end end addCommandHandler("hunters", HunterInfo) When the hunter.counts is 0 it should display that player didn't reach hunter yet, and when player tries /hunter [person] it should show the same if they don't have hunter. Its not working Line 30 = line 9 btw
  22. Okay here is the thing, i made a script that will create a marker in a random place on map. Its server-side and its a race gamemode script as well ( [DM] ) I want these markers to get auto deleted on every new map starts, i tried onMapStarting and i failed hard, removeElementData didn't work for me as well, any suggestions?
×
×
  • Create New...