OrbTanT Posted August 17, 2014 Posted August 17, 2014 How can I set a effect, when player pass above the pickup, I tried to use createEffect, more not working with pickup. server addEventHandler("onPickupHit", grovepickup, function (player) local playerTeam = getPlayerTeam(player) if (playerTeam) then local r, g, b = getTeamColor(playerTeam) local aR, aG, aB = getRadarAreaColor(GROVE) if (r == aR) and (g == aG) and (b == aB) then outputChatBox("", player, 0, 0, 0, true) else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end end)
OrbTanT Posted August 17, 2014 Author Posted August 17, 2014 Effects sparks, more appear the effects only, for the gang, and not for those who cannot use
Max+ Posted August 17, 2014 Posted August 17, 2014 Effects sparks, more appear the effects only, for the gang, and not for those who cannot use Check this , https://wiki.multitheftauto.com/wiki/Cl ... _functions
Max+ Posted August 17, 2014 Posted August 17, 2014 createEffect dosen't work on MTA 1.3 it does work and i tryed it with fire , : )
OrbTanT Posted August 17, 2014 Author Posted August 17, 2014 It is possible to put some kind of effect on pickup in version 1.3.5
Max+ Posted August 17, 2014 Posted August 17, 2014 It is possible to put some kind of effect on pickup in version 1.3.5 see , what i gave you
OrbTanT Posted August 17, 2014 Author Posted August 17, 2014 I tried to use this script, more is not working client function onPickupHitShow ( thePlayer ) local pickupType = getPickupType ( source ) local x, y, z = getElementPosition(localPlayer) if (pickupType == 1) then fxAddSparks( x, y, z, x+10, y+10, z+10) end end addEventHandler ( "onPickupHit", getRootElement(), onPickupHitShow ) server c4 = createPickup ( 2511.323, -1688.844, 13.549, 1, 15, 0 ) addEventHandler("onPickupHit", c4, function (player) local playerTeam = getPlayerTeam(player) if (playerTeam) then local r, g, b = getTeamColor(playerTeam) local aR, aG, aB = getRadarAreaColor(GROVE) if (r == aR) and (g == aG) and (b == aB) then outputChatBox("", player, 0, 0, 0, true) else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end end)
xeon17 Posted August 17, 2014 Posted August 17, 2014 Use https://wiki.multitheftauto.com/wiki/CreateEffect
Max+ Posted August 17, 2014 Posted August 17, 2014 I tried to use this script, more is not workingclient function onPickupHitShow ( thePlayer ) local pickupType = getPickupType ( source ) local x, y, z = getElementPosition(localPlayer) if (pickupType == 1) then fxAddSparks( x, y, z, x+10, y+10, z+10) end end addEventHandler ( "onPickupHit", getRootElement(), onPickupHitShow ) server c4 = createPickup ( 2511.323, -1688.844, 13.549, 1, 15, 0 ) addEventHandler("onPickupHit", c4, function (player) local playerTeam = getPlayerTeam(player) if (playerTeam) then local r, g, b = getTeamColor(playerTeam) local aR, aG, aB = getRadarAreaColor(GROVE) if (r == aR) and (g == aG) and (b == aB) then outputChatBox("", player, 0, 0, 0, true) else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end end) Great Job , using 'onPickupHit' -- server with localPlayer ---client and getPickupType ( source ) ---- it sould be thePlayer ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now