CRX Posted July 2, 2011 Posted July 2, 2011 Hi, I have script "Hunter Alert". When anyone gets a Hunter should appear msg "blabla gets a Hunter!" and should appear image "Hunter has been reached". Script: local image function hunterAlert(mapInfo, pickupID, pickupType, vehicleModel) info = mapInfo.modename if info == "Destruction derby" then if pickupType == "vehiclechange" then if vehicleModel == 425 then outputChatBox('[HUNTER] '..getPlayerName(source)..' has reached a Hunter!',getRootElement(),255,0,0) image = guiCreateStaticImage( 0.2, 0.1, 0.5, 0.1, "hunter.png", true ) guiSetVisible(image, false) end end end end function HNEnd() setTimer(guiSetVisible, 2000, 1, image, false) guiSetVisible(image, true) end addEventHandler("playHunter", getLocalPlayer(), HNEnd) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),hunterAlert) Sorry for my English...
#Paper Posted July 2, 2011 Posted July 2, 2011 what's the problem? My skype: skiper964 I helped you? Help me! ^^ Help me bro! ^^
CRX Posted July 2, 2011 Author Posted July 2, 2011 Msg and picture not displayed. Sorry for my English...
bandi94 Posted July 2, 2011 Posted July 2, 2011 function someoneReachedHunter(number, sort, model) if sort == "vehiclechange" and model == 425 then outputChatBox ( getPlayerName(source).." #FF6464has gotten the hunter! Run!", getRootElement(), 255, 255, 255, true ) end end addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter) i never worked whit image .... Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
CRX Posted July 2, 2011 Author Posted July 2, 2011 Heh thanks, but I need version with image (msg too). ;D Sorry for my English...
#Paper Posted July 2, 2011 Posted July 2, 2011 addEvent("onPlayerPickUpRacePickup", true) function onHunter(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then outputChatBox('[HUNTER] '..getPlayerName(source)..' has reached a Hunter!',getRootElement(),255,0,0) image = guiCreateStaticImage( 0.2, 0.1, 0.5, 0.1, "hunter.png", true ) end end addEventHandler("onPlayerPickUpRacePickup", getRootElement(), onHunter) function HNEnd() setTimer(guiSetVisible, 2000, 1, image, false) end addEventHandler("playHunter", getRootElement(), HNEnd) Put this script in Server side, idk if it works, test My skype: skiper964 I helped you? Help me! ^^ Help me bro! ^^
bandi94 Posted July 2, 2011 Posted July 2, 2011 tell me if AcitanoX's sript not work i will try to make the img (msg tool) Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
#Paper Posted July 2, 2011 Posted July 2, 2011 tell me if AcitanoX's sript not work i will try to make the img (msg tool) in mine script there is the img part... .-. My skype: skiper964 I helped you? Help me! ^^ Help me bro! ^^
karlis Posted July 2, 2011 Posted July 2, 2011 server: addEvent("onPlayerPickUpRacePickup", true) addEventHandler("onPlayerPickUpRacePickup", getRootElement(), function(_, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then outputChatBox('[HUNTER] '..getPlayerName(source)..' has reached a Hunter!',getRootElement(),255,0,0) triggerClientEvent("playHunter",getRootElement()) end end) client: local image = guiCreateStaticImage( 0.2, 0.1, 0.5, 0.1, "hunter.png", true ) guiSetVisible(image,false) function HNEnd() guiSetVisible(image,true) setTimer(guiSetVisible, 2000, 1, image, false) end addEvent("playHunter",true) addEventHandler("playHunter", getRootElement(), HNEnd) [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
JR10 Posted July 2, 2011 Posted July 2, 2011 addEvent("onPlayerPickUpRacePickup", true) function onHunter(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then outputChatBox('[HUNTER] '..getPlayerName(source)..' has reached a Hunter!',getRootElement(),255,0,0) image = guiCreateStaticImage( 0.2, 0.1, 0.5, 0.1, "hunter.png", true ) end end addEventHandler("onPlayerPickUpRacePickup", getRootElement(), onHunter) function HNEnd() setTimer(guiSetVisible, 2000, 1, image, false) end addEventHandler("playHunter", getRootElement(), HNEnd) Put this script in Server side, idk if it works, test Client side.* Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
karlis Posted July 2, 2011 Posted July 2, 2011 most common bug out here: mixing clientside functions with serverside functions(or serverside versions of function) [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
CRX Posted July 4, 2011 Author Posted July 4, 2011 Thanks, but when i get the hunter i see "[HUNTER] #00AADDC#FFC000RX has reached a Hunter! How to change [HUNTER] CRX (or CRX) has reached a Hunter! Sorry for my English...
karlis Posted July 4, 2011 Posted July 4, 2011 outputChatBox('[HUNTER] '..getPlayerName(source)..' has reached a Hunter!',getRootElement(),255,0,0,true) [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
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