orcun99 Posted February 25, 2018 Posted February 25, 2018 (edited) server side: lvcol = createColCircle ( 1796.6412353516,1740.2864990234, 1250 ) --LAS VENTURAS COOLSAPEHİT function playerJustGotDied(ammo, attacker, weapon, bodypart) outputChatBox("öldün") x, y, z = getElementPosition ( source ) local money = createPickup ( x, y, z, 3, 1212 ) end addEventHandler("onPlayerWasted", getRootElement(), playerJustGotDied); function pickupUse ( player ) givePlayerMoney ( player, 10000 ) end addEventHandler ( "onPickupUse", money, pickupUse ) function giris( player ) outputChatBox("You will cant use pvp command in Las Venturas",player) end addEventHandler( "onColShapeHit", lvcol, giris ) if the player dies in lasventuras, I want the money pickup out where he died. but if the player not in dies in lasventuras then there is no pickup out when he died Edited February 25, 2018 by orcun99
ALw7sH Posted February 25, 2018 Posted February 25, 2018 Use getZoneName check for zone name with citiesonly parameter im your playerJustGotDued function
orcun99 Posted February 25, 2018 Author Posted February 25, 2018 I don't know how to use getzonename can u edit my code please ? please don't send wiki links
Tommy. Posted February 25, 2018 Posted February 25, 2018 function playerJustGotDied() local x, y, z = getElementPosition ( source) if (getZoneName (x, y, z, true) == "Las Venturas") then local money = createPickup(x, y, z, 3, 1212) outputChatBox("öldün") end end addEventHandler("onPlayerWasted", getRootElement(), playerJustGotDied); I did not test 1
orcun99 Posted February 26, 2018 Author Posted February 26, 2018 13 hours ago, Tommy. said: function playerJustGotDied() local x, y, z = getElementPosition ( source) if (getZoneName (x, y, z, true) == "Las Venturas") then local money = createPickup(x, y, z, 3, 1212) outputChatBox("öldün") end end addEventHandler("onPlayerWasted", getRootElement(), playerJustGotDied); I did not test works thank u but one more think I need if player onpickup then giveplayer money +1000
Captain Cody Posted February 26, 2018 Posted February 26, 2018 (edited) Add this function pickupUse ( player ) if getElementModel(source) == 1212 then givePlayerMoney ( player, 10000 ) end end addEventHandler ( "onPickupUse", resourceRoot, pickupUse ) Edited February 26, 2018 by CodyJ(L)
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