Chronos
-
Posts
71 -
Joined
-
Last visited
Posts posted by Chronos
-
-
Kill all the timers when the player leaves the colshape.
a little help with command castillo,i'll use killTimer and ..?
-
thx for help.
/lock.
-
can u give me a example !
-
hello , well i made turf system but i have a problem.
local pArea = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ) local pArea2 = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 0, 255, 0, 175 ) function radar ( player ) local playerGang = getElementData ( player, "gang" ) local turfGang = getElementData ( pCuboid, "getTurfGang", true ) if (turfGang == playerGang) then else if not getPlayerTeam(player) then return end local team = getPlayerTeam ( player ) if (getTeamName( team ) == "Criminal") then local playerGang = getElementData ( player, "gang" ) if ( playerGang ) then if ( isTimer ( beachturfTimer ) ) then return end local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) local turfGang = getElementData ( pCuboid2, "getTurfGang", true ) setRadarAreaFlashing ( pArea, false ) if turfGang then outputChatBox("Entrer zone"..turfGang..". to provoke this turf stay here", player, 0, 255, 0, false) else outputChatBox("this turf without owner stay here to take it.", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 1/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 2/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 3/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 4/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 5/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 6/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 7/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 8/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 9/10", player, 0, 255, 0, false) outputChatBox("Capturing turf progress 10/10", player, 0, 255, 0, false) setRadarAreaFlashing ( pArea, true ) outputChatBox("stay here to claim this turf.", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 1/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 2/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 3/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 4/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 5/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 6/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 7/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 8/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 9/10", player, 0, 255, 0, false) outputChatBox("Preparing turf war progress 10/10", player, 0, 255, 0, false) end beachturfTimer = setTimer ( function ( ) local beachTurfCplayers = getElementColShape ( pCuboid ) local players = getElementsWithinColShape ( pCuboid, "player" ) setRadarAreaColor ( pArea, tonumber(r), tonumber(g), tonumber(b), 100 ) for _, player in ipairs ( players ) do outputChatBox("congratulation,your gang gas taken the turf.", player, 0, 255, 0, false) triggerClientEvent("onTakeTurf", player) givePlayerMoney ( player, 5000 ) setElementData ( pCuboid, "getTurfGang", playerGang ) end setRadarAreaFlashing ( pArea, false ) end ,120000, 1 ) end end end end addEventHandler ( "onColShapeHit", pCuboid, radar )
the problem is in outputChatpox i test it ,when i entrer the turf the count start to fast.
-
hello , i made this gui but still i need some help ,well i need some functions that's make me to create team,wirh RPG color,and Marker Position to take the team.
gui:
GUIEditor = { checkbox = {}, edit = {}, button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(259, 115, 300, 200, "Team manager", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFA3803") GUIEditor.edit[1] = guiCreateEdit(300, 184, 0, 15, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(10, 35, 80, 22, "Create Team:", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(100, 35, 180, 22, "", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(10, 82, 75, 22, "Team color:", false, GUIEditor.window[1]) GUIEditor.checkbox[1] = guiCreateCheckBox(302, 173, 0, 15, "", false, false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(110, 82, 45, 22, "", false, GUIEditor.window[1]) GUIEditor.edit[4] = guiCreateEdit(172, 82, 45, 22, "", false, GUIEditor.window[1]) GUIEditor.edit[5] = guiCreateEdit(235, 82, 45, 22, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(10, 129, 90, 22, "Marker Position:", false, GUIEditor.window[1]) GUIEditor.edit[6] = guiCreateEdit(110, 129, 45, 22, "", false, GUIEditor.window[1]) GUIEditor.edit[7] = guiCreateEdit(172, 129, 45, 22, "", false, GUIEditor.window[1]) GUIEditor.edit[8] = guiCreateEdit(235, 129, 45, 22, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(117, 168, 100, 22, "add team", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFA5402") end )
as you can see this is the gui.
-
Chronos: If I remember correctly you already have a server? client-215?
nah i don't have any server
-
-
"onResourceStart" removeCommandHandler
u can explain more ..
-
hello i need help when i start this resource,i can't use it IG i mean command doean't work.
function event(source) if (isElement(theMarker)) then destroyElement(theMarker) local nombre2 = getPlayerName(source) outputChatBox("#FF0000[Event]#00FF00 Event is full", getRootElement(), 255, 255, 255, true) removeCommandHandler("eventwarp") else local x,y,z = getElementPosition(source) theMarker = createMarker ( x, y, z, "checkpoint", 2, 255, 255, 255, 100 ) local nombre = getPlayerName(source) outputChatBox("#FF0000[Event]#00FF00 A event has been created, #00FF00Use #FF0000/eventwarp #00FF00for participe!", getRootElement(), 255, 255, 255, true) addCommandHandler("eventwarp", eventowarp) end end addCommandHandler("ev", evento) function eventowarp(thePlayer) if isElement(theMarker) then local x, y, z = getElementPosition(theMarker) setElementPosition(thePlayer, x, y, z) end end function warpToEvent (thePlayer) if (not getElementData (thePlayer,"inEvent?")) then maxPlayers = maxPlayers + 1 detectP () local capacity = getElementData (root,"capacity") if maxPlayers <= capacity then if (not getElementData (thePlayer,"inEvent?")) then local xm,ym,zm = getElementPosition (markerEvent) setElementPosition ( thePlayer, xm, ym, zm + 2.5 ) setElementDimension ( thePlayer, tonumber(getElementData(root,"dimension"))) setElementData (thePlayer,"inEvent?", "yes") end else outputChatBox ("The event is full", thePlayer, 255, 0, 0) end end end function playersLeft (thePlayer) outputChatBox("Player left to full event "..(tonumber(getElementData (root,"capacity")) - tonumber(maxPlayers)).."", thePlayer, 0, 255, 0) end addCommandHandler ("playersleft", playersLeft) function cancelEvent (thePlayer) if getPlayerTeam (thePlayer) == getTeamFromName ("Staff") then outputChatBox ("Event has been cancelled", getRootElement(), 255, 0, 0) destroyElement(markerEvent) local players = getElementsByType("player") for index,pie in ipairs(players) do if getElementData (pie,"inEvent?") == "yes" then setElementPosition ( pie, 0, 0, 3 ) setElementDimension ( pie, 0 ) removeCommandHandler ("eventwarp", warpToEvent) removeCommandHandler ("leaveevent", leftEvent) end end end end addCommandHandler ("cancelevent", cancelEvent) function cancelEvent (thePlayer) if getPlayerTeam (thePlayer) == getTeamFromName ("Staff") then outputChatBox ("Event has been cancelled", getRootElement(), 255, 0, 0) destroyElement(markerEvent) local players = getElementsByType("player") for index,pie in ipairs(players) do if getElementData (pie,"inEvent?") == "yes" then setElementPosition ( pie, 0, 0, 3 ) setElementDimension ( pie, 0 ) removeElementData (pie,"inEvent?") removeCommandHandler ("eventwarp", warpToEvent)
-
hello mates today i see this video about script generator. and i need link for this pragrame in english version
-
@chronos :
Tell me how he'll ever learn if we gave him ready scripts ??
It's not that the script is hard t make or not, Here we want people to learn how to script .
Not giving them ready codes doesn't mean that we don't want to help !
( Don't give me a fish, But teach me fishing )
ik ... it okey..
-
-
Hi all.
I need Help.
SWAT job but I need to so that only those who are able to get into SWAT inside the Marriott group.
Help me PLS
THX.
It's a simple script, I don't see where's the big deal of sharing it with him?
Client side
local marker = createMarker( 416.81219482422, -1821.8325195313, 5.4904899597168, "Cylinder", 1.5, 0, 69, 139, 0) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"SWAT") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To be a SWAT member, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function SWAT(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWAT) function SWATjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false)
u can change (x,y,z)
Server Side
createBlip ( 416.81219482422, -1821.8325195313, 5.4904899597168, 56 ) function createSWATTeam () ArmedForcesteam = createTeam ("SWAT",15,1,250) end addEventHandler ("onResourceStart", resourceRoot, createSWATTeam) function joinSWAT() setPlayerTeam(source,SWAT,team) setElementModel(source, 285) giveWeapon ( source, 3, 24, 31) setElementData( source, "Occupation", "SWATteam", true ) outputChatBox("You are now a SWAT member.",source,15,1,250) end addEvent("setSWAT", true) addEventHandler("setSWAT",root,joinSWAT) function policeJob ( attacker, attackerweapon, bodypart, loss ) theTeam = getPlayerTeam ( attacker ) if (attackerweapon == 3) and (loss > 2 ) then setElementPosition (source, 219, 110, 999, true) setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) takePlayerMoney (source, 50) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage", getRootElement(), armedforces)
also u can change blip marker ...
if u need any help post or pm me ..
-
how i can add some new animation to my local server
here my animation.map
"Dance"> "Clap 1" block="DANCING" code="bd_clap" /> "Clap 2" block="DANCING" code="bd_clap1" /> "Dance Loop" block="DANCING" code="dance_loop" /> "Dan Down" block="DANCING" code="DAN_Down_A" /> "Dan Left" block="DANCING" code="DAN_Left_A" /> "Dan Loop" block="DANCING" code="DAN_Loop_A" /> "Dan Right" block="DANCING" code="DAN_Right_A" /> "Dan Up" block="DANCING" code="DAN_Up_A" /> "Dance 1" block="DANCING" code="dnce_M_a" /> "Dance 2" block="DANCING" code="dnce_M_b" /> "Dance 3" block="DANCING" code="dnce_M_c" /> "Dance 4" block="DANCING" code="dnce_M_d" /> "Dance 5" block="DANCING" code="dnce_M_e" /> "Airport"> "Brawl" block="Airport" code="thrw_barl_thrw" /> "Attractors"> "Stepsit_in" block="Attractors" code="Stepsit_in" /> "Stepsit_loop" block="Attractors" code="Stepsit_loop" /> "Stepsit_out" block="Attractors" code="Stepsit_out" /> "BOMBER"> "BOM_Plant" block="BOMBER" code="BOM_Plant" /> "BOM_Plant_2Idle" block="BOMBER" code="BOM_Plant_2Idle" /> "BOM_Plant_Crouch_In" block="BOMBER" code="BOM_Plant_Crouch_In" /> "BOM_Plant_In" block="BOMBER" code="BOM_Plant_In" /> "BOM_Plant_Loop" block="BOMBER" code="BOM_Plant_Loop" /> "BUDDY"> "buddy_crouchfire" block="BUDDY" code="buddy_crouchfire" /> "buddy_crouchreload" block="BUDDY" code="buddy_crouchreload" /> "buddy_fire" block="BUDDY" code="buddy_fire" /> "buddy_fire_poor" block="BUDDY" code="buddy_fire_poor" /> "buddy_reload" block="BUDDY" code="buddy_reload" /> "MISC"> "bitchslap" block="MISC" code="bitchslap" /> "BMX_celebrate" block="MISC" code="BMX_celebrate" /> "Case_pickup" block="MISC" code="Case_pickup" /> "door_jet" block="MISC" code="door_jet" /> "GRAB_L" block="MISC" code="GRAB_L" /> "Hiker_Pose" block="MISC" code="Hiker_Pose" /> "dle_Chat_02" block="MISC" code="dle_Chat_02" /> "KAT_Throw_O" block="MISC" code="KAT_Throw_O" /> "PASS_Rifle_Ply" block="MISC" code="PASS_Rifle_Ply" /> "Plane_hijack" block="MISC" code="Plane_hijack" /> "Run_Dive" block="MISC" code="Run_Dive" /> "Scratchballs_01" block="MISC" code="Scratchballs_01" /> "smlplane_door" block="MISC" code="smlplane_door" /> "CPR" block="MISC" code="CPR" /> "Door_Kick" block="MISC" code="Door_Kick" />
-
Line -9- Server Side :
Change the set team function to :
setPlayerTeam(source,ArmedForces)
And try .
nah still the same problem.
-
You want to show the gui for a team only ?
this is my problem when i join team for example armedforces i want my name be in armedforces members.
http://s3.postimg.org/is114nnz7/mta_scr ... _45_55.png
-
client side:
local marker = createMarker( 95.459037780762, 1923, 18.107088088989, "Cylinder", 1.5, 0, 69, 139, 0) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"ArmedForces") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To be a solider, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function Armed_Forces(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Armed_Forces) function Soliderjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Soliderjobleave) function joinTeam() triggerServerEvent("setArmedForces",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeArmedForcesWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeArmedForcesWindow, false)
server side:
createBlip ( 95.459037780762, 1923.5686035156, 18.107088088989, 56 ) function createArmedForcesTeam () ArmedForcesteam = createTeam ("ArmedForces",69,139,0) end addEventHandler ("onResourceStart", resourceRoot, createArmedForcesTeam) function joinArmedForces() setPlayerTeam(source,ArmedForces,team) setElementModel(source, 287) giveWeapon ( source, 3, 24, 31) setElementData( source, "Occupation", "ArmedForcesteam", true ) outputChatBox("You are now a solider.",source,69,139,0) end addEvent("setArmedForces", true) addEventHandler("setArmedForces",root,joinArmedForces) function policeJob ( attacker, attackerweapon, bodypart, loss ) theTeam = getPlayerTeam ( attacker ) if (attackerweapon == 3) and (loss > 2 ) then setElementPosition (source, 219, 110, 999, true) setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) takePlayerMoney (source, 50) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage", getRootElement(), armedforces)
-
hello i have problem when i join any team
http://s3.postimg.org/is114nnz7/mta_scr ... _45_55.png
http://s3.postimg.org/6imlrqt5v/mta_scr ... _46_00.png
http://s3.postimg.org/o64epy337/mta_scr ... _46_04.png
so that my problem idk where is but i hope any one help me
-
delete
-
You can't add a new models but you can replace models .
u mean i creat skin .txd and just remplace it ?
-
hello.
i want creat skin to use it , in txd and dff
help plz
-
hello
i want add new skin to my local server but id know how ? help plz
-
shit the same problem don't work
-
Yes this is a map code and put it on a map file.
and what i can do in meta.xml plz
i put this but don't work .
type="map" version="1.0.0"> "CAMORRAbase.map" dimension="0">
[resolved]
in Scripting
Posted
thx mate ^^