Jump to content

Galactix

Members
  • Posts

    121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Galactix

  1. Galactix

    Error damage

    I guess maybe your server doesn't have a strong enough connection and players are getting high ping which delay the response time between the client and the server which and would explain why you can't shoot players that are running, because of their delay, they won't be considered at the position where you shoot by the server.
  2. Sorry, I don't know how to work with mySQL.
  3. https://forum.multitheftauto.com/topic/45036-rel-heroinventory-inventory-system-groups-more/
  4. function createText(thePlayer, command,...) local message = table.concat({...}, "") if message ~= "" then triggerClientEvent("CreateBox", root, message) else return outputChatBox("Synat:/ "..command.." text", thePlayer, 255, 0, 0) end end addCommandHandler("", createText) -- "" put the command you wanτ This will work. The event that is supposed to be triggered is CreateBox, not CreateTipBox, which is triggered itself by CreateBox.
  5. Galactix

    business

    You would simply have to script firstly the jobs that you would want in your server (basic scripting), to then script every group related to each separate job (using createTeam or setAccountData) and after you could make the possibility, for example, do /duty when you stand in a marker in front of the hospital as someone belonging to the doctor job group (for that you would just use getPlayerTeam or getAccountData depending on what you choose to use) and then you could finally grant permissions to each and every group like police officers can use police cars and armory or stuff like that (you could do that using just the same as in the previous step). You could also achieve all this by using ACL rank but it may be a little inappropriate to use. My personal preference would be to go with setAccountData and getAccountData when you need to retrieve the permissions allowed to a player by his job group.
  6. Galactix

    Hydra Flares

    You would need to find the appropriate texture mod for the flares and make players download it at join
  7. Galactix

    Hydra Flares

    What exactly do you mean? Hydra has flares indeed but what script would you wanna make out of that? If you wanna make something shoot hydra flares, then you should use this: https://wiki.multitheftauto.com/wiki/CreateProjectile
  8. Just change thePlayer to source in your getPlayerAccount variable A client script is what is executed on the player's computer directly, not on the server. A client script doesn't use variables like thePlayer and such because everything is source related in general.
  9. vipVehicles = { [520]=true } function onVehicleStartEnter ( enteringPlayer, seat, jacked, door ) local cuenta = getAccountName( getPlayerAccount(thePlayer) ) if isObjectInACLGroup("user."..cuenta, aclGetGroup("VIP")) then --Group VIP spaces(thePlayer) else outputChatBox ( "● You must be vip to enter this vehicle", thePlayer, 0, 255, 0 ) -- and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), onVehicleStartEnter ) I Don't understand the spaces part though, could you explain what is its purpose?
  10. Show the script causing the error maybe?
  11. Galactix

    help

    Oh alright, I get what you meant now, but I wasn't talking of the nesting in my second post, which is why you were confused.
  12. Galactix

    help

    Which is what I said in my first post.
  13. function setNickToAccount() local account = getPlayerAccount(source) local accountName = getAccountName(account) setPlayerName(source, accountName) end addEventHandler("onPlayerLogin", setNickToAccount)
  14. function setNickToAccount() local account = getPlayerAccount(source) local accountName = getAccountName(account) setPlayerName(source, accountName) end addEventHandler("onPlayerLogin", setNickToAccount) Put this in any script and you should have the result expected.
  15. You need to modify the default scoreboard resource in order to replace the name shown by the actual name of the account used by the player.
  16. Galactix

    help

    Also make sure if your function is called changenick to use the same name in the handler and not something like wasNickChangedByUser
  17. Galactix

    help

    The event handler has to be under the fuction if you don’t include the function directly to the handler like in the working script you shown. A computer reads code from up to bottom so you’re just calling a function that doesn’t exist for the computer, which is solved by putting the addeventhandler under the function
  18. Change the v variable to source and remove the last line with onVehicleExit
  19. You need to give me the exact line of the error aswell as the argument arkadas
  20. could you give full error from the debugscript?
  21. function spamEngelle(oyuncu,deger) -- spam engelleme fonksiyon local serial = getPlayerSerial(oyuncu) if deger == "Mutele" then outputChatBox(getPlayerName(oyuncu).."#CC0000 60 #FFFFFFSaniye Susturuldun. #CC0000Sebep: #FFFFFFFlood/Spam", root, 255,255,255,true) setPlayerMuted(oyuncu, true) setTimer (spamEngelle, 60000, 1, oyuncu, "Mute Kaldır") muteliler[serial] = true elseif deger == "Mute Kaldır" then if isElement (oyuncu) and isPlayerMuted (oyuncu) then setPlayerMuted ( oyuncu, false ) antiSpam[oyuncu] = nil muteliler[serial] = false outputChatBox ("#FFFFFF"..getPlayerName ( oyuncu ).." #66FF00Cezan Bitti.",root, 255, 255, 0,true ) else antiSpam[oyuncu] = nil end end end addEventHandler( "onPlayerChat", getRootElement(), spamEngelle )
  22. function DrawLaser(player) if getElementData(player, "laser.on") then local targetself = getPedTarget(player) if targetself and targetself == source then targetself = true else targetself = false end if getElementData(player, "laser.aim") and IsPlayerWeaponValidForLaser(player) == true and targetself == false then local x,y,z = getPedWeaponMuzzlePosition(player) if not x then outputDebugString("getPedWeaponMuzzlePosition failed") x,y,z = getPedTargetStart(player) end local x2,y2,z2 = getPedTargetEnd(player) if not x2 then --outputDebugString("getPedTargetEnd failed") return end local x3,y3,z3 = getPedTargetCollision(player) local r,g,b,a = GetLaserColor(player) if x3 then -- collision detected, draw til collision and add a dot dxDrawLine3D(x,y,z,x3,y3,z3, tocolor(r,g,b,a), laserWidth) DrawLaserDot(player, x3,y3,z3) else dxDrawLine3D(x,y,z,x2,y2,z2, tocolor(r,g,b,a), laserWidth) ----641.dize DestroyLaserDot(player) end else DestroyLaserDot(player) end else DestroyLaserDot(player) end
  23. I get that, but what error do you get with your script? I Don't know Turkish so I just know the script is about spam and mute but that's it, so try to explain your error exactly
  24. addEvent("onPlayerFinish",true) addEventHandler("onPlayerFinish", getRootElement(), function ( rank, time ) local totalMarker = getMarkerCount() local account = getPlayerAccount(source) if rank == 1 then if not (isGuestAccount(account)) then givePlayerMoney ( source, 2500*totalMarker ) -- change 2500 to the amount you wanna give per checkpoint in race* outputChatBox("You finished the race in first place with "..totalMarker.." markers!", source, 0,255,0) else outputChatBox("You are not registered!", source,255,0,0) return end else end end) Sorry for the late reply! Better get a reply now than never afterall
×
×
  • Create New...