Jump to content

Patrick

Moderators
  • Posts

    1,143
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by Patrick

  1. Try this, maybe work. I don't know. function resume() for key, value in ipairs(threads) do if coroutine.status(value) ~= "dead" then coroutine.resume(value) end end end
  2. if (getTeamName(team) == "Los Sa326 Enterprises") or (getTeamName(team) == "Los Santos Police Department") or (getTeamName(team) == "San Andreas State Police") then Replace first line to this.
  3. -- SERVER SIDE SCRIPT addCommandHandler("kit", function(player) giveWeapon(player, 30, 1000) -- M4 with 1000 ammo -- example: giveWeapon(player, WEAPONID, AMMO) end) Here you can find the weapon ids: https://wiki.multitheftauto.com/wiki/Weapons
  4. -- only on client side local screenWidth, screenHeight = guiGetScreenSize() local centerX, centerY = screenWidth/2, screenHeight/2
  5. addEventHandler ( "onClientPlayerDamage", getRootElement(), playerdamaged ) to addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), playerdamaged )
  6. addCommandHandler( 'pay', function( source,_,player,amount ) local find = findPlayer( player ) if find then local sourceAccount = getPlayerAccount ( source ) local guestAccount = isGuestAccount ( sourceAccount ) if guestAccount then outputChatBox( '[Pay]: You are not logged in!',source,255,0,0 ) else if amount then givePlayerMoney( find,tonumber( amount ) ) takePlayerMoney ( source, tonumber(amount) ) outputChatBox( '[Pay]:You transfered '..amount..'$ to '..getPlayerName( find ),source,255,0,0 ) outputChatBox( '[Pay]:You received '..amount..'$ from '..getPlayerName( source ),find,0,255,0 ) else outputChatBox( '[Pay]:/pay [playername][amount]!',source,255,0,0 ) end end else outputChatBox( '[Pay]:Player not found!',source,255,0,0 ) end end)
  7. --HEROIN DRUG EFFECT ON function heroinDrugOn(player) setPedStat ( player, 24, 1000) setElementHealth(player, 200) setTimer(heroinDrugOff, 60000, 1, player) triggerClientEvent ( player, "heroinOnMessage", root) end addCommandHandler("useheroin", heroinDrugOn) --HEROIN DRUG EFFECT GOING OFF function heroinDrugOff(player) local playerHealth = getElementHealth(player) if (playerHealth > 100) then setElementHealth(player, 100) end setPedStat (player, 24, 590) triggerClientEvent ( player, "heroinOffMessage", root) end
  8. Patrick

    Shoutall problem

    dxDrawText(shoutText, screenX/4, screenY/4, screenX/4*3, screenY/4*3, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "top", false, true)
  9. Patrick

    Shoutall problem

    Sorry bro, but we are a community.. So this script is for everyone.
  10. Patrick

    Shoutall problem

    Here it is. Sorry for late answer. Link: https://community.multitheftauto.com/?p=resources&s=details&id=15525
  11. addCommandHandler("change", function(player) local veh = getPedOccupiedVehicle(player) if veh then setVehicleHandling(veh, "mass", 1500) end end)
  12. Patrick

    Shoutall problem

    I gonna make it, and send it to you. (Max 30 mins, I have a little business to do, before it.)
  13. Patrick

    Shoutall problem

    You want to shout text to all player screen?
  14. Patrick

    Shoutall problem

    outputChatBox("#ff0000(#FF0040Shoutall#ff0000)"..getPlayerName(player).."#ffffff"..message.."", root, 255, 255, 255, true)
  15. I tested it with version 12195, and it's working fine. I've been waiting for this for months.
  16. Check the 'runcode' resource. (default MTA resource, like admin-panel) You can use this resource to run scripts with commands. - Server side script: /srun <script> - Client side script: /crun <script> (You need to use one-line script. example: /crun x,y,z = getElementPosition(localPlayer) setElementPosition(localPlayer, x,y,z+5))
  17. You have a default MTA resource in your resource folder, what name is: joinquit In this script you can find a 'onClientPlayerChangeNick' event. You need to delete this event, because this function create the info to the chat. (You still need to cancel this event somewhere.)
  18. The player can't change her name, but on the chat you got the info?
  19. You need to cancel this event: https://wiki.multitheftauto.com/wiki/OnPlayerChangeNick
  20. -- SERVER SIDE SCRIPT function walkstyle(thePlayer) setPedWalkingStyle(thePlayer, 128) end function walk ( thePlayer ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Console" ) ) then walkstyle(thePlayer) end end addCommandHandler("walk", walk)
  21. addEventHandler("onClientVehicleStartEnter", getRootElement(), function() setRadioChannel(0) end) addEventHandler("onClientPlayerRadioSwitch", getRootElement(), function() cancelEvent() end)
×
×
  • Create New...