-
Posts
1,143 -
Joined
-
Last visited
-
Days Won
43
Everything posted by Patrick
-
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
-
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.
-
-- 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
-
You are welcome!
-
-- only on client side local screenWidth, screenHeight = guiGetScreenSize() local centerX, centerY = screenWidth/2, screenHeight/2
-
addEventHandler ( "onClientPlayerDamage", getRootElement(), playerdamaged ) to addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), playerdamaged )
-
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)
-
--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
-
dxDrawText(shoutText, screenX/4, screenY/4, screenX/4*3, screenY/4*3, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "top", false, true)
-
Sorry bro, but we are a community.. So this script is for everyone.
-
Here it is. Sorry for late answer. Link: https://community.multitheftauto.com/?p=resources&s=details&id=15525
-
addCommandHandler("change", function(player) local veh = getPedOccupiedVehicle(player) if veh then setVehicleHandling(veh, "mass", 1500) end end)
-
I gonna make it, and send it to you. (Max 30 mins, I have a little business to do, before it.)
-
You want to shout text to all player screen?
-
outputChatBox("#ff0000(#FF0040Shoutall#ff0000)"..getPlayerName(player).."#ffffff"..message.."", root, 255, 255, 255, true)
-
I tested it with version 12195, and it's working fine. I've been waiting for this for months.
-
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))
-
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.)
-
The player can't change her name, but on the chat you got the info?
-
You need to cancel this event: https://wiki.multitheftauto.com/wiki/OnPlayerChangeNick
-
-- 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)
