-
Posts
1,903 -
Joined
-
Last visited
-
Days Won
1
Everything posted by xeon17
-
All is working good , only one thing no.. when player get in contact with the money pickup of the died player he should get his money but that not happen. When a player die then crate a pickup of money he has before died , when someone get in contact with pickup he get that money
-
When i get in contact with the money pickup , i no get money of player who died. any help please function createMoney(player) local x, y, z = getElementPosition(player); local x1, y1, x2, y2; x1 = (x-2)+(math.random()*4); y1 = (y-2)+(math.random()*4); x2 = (x-2)+(math.random()*4); y2 = (y-2)+(math.random()*4); local moneyAmmount = getPlayerMoney(player); -- it is not fair too get all the player money. moneyAmmount = math.floor(moneyAmmount/1); takePlayerMoney(player, moneyAmmount); -- We are going to create 3 pickups, zo we are just cut the ammount in half moneyAmmount = math.floor(moneyAmmount/3); -- Create the pickups setElementData(createPickup(x1, y1, z, 3, 1212), "ammount", moneyAmmount); setElementData(createPickup(x2, y2, z, 3, 1212), "ammount", moneyAmmount); setElementData(createPickup(x2, y2, z, 3, 1212), "ammount", moneyAmmount); end function moneyPickupHit(player) local money = getElementData(source, "ammount"); if money then givePlayerMoney(player, money); destroyElement(source); end end function playerJustGotDied(ammo, attacker, weapon, bodypart) createMoney(source); end addEventHandler("onPickupUse", getRootElement(), moneyPickupHit); addEventHandler("onPlayerWasted", getRootElement(), play
-
I'm no know SQL / MYSQL I think wont happen that 2 teams got the same color.
-
I have a question , i working an my Base system. I seen in 1 server when a gang buy the base their gang members spawn in the base. So i ask how is that possible ? i thinked maybe something like this radararea2 = createRadarArea( 110.91990, 1800.89435, 200, 145, 255, 255, 255, 225 ) function GangSpawn ( thePlayer) local playerTeam = getPlayerTeam ( thePlayer ) if ( playerTeam ) then local r, g, b = getTeamColor ( playerTeam ) can i use getRadarAreaColor and '' if the RadarAreaColor is local r, g, b = getTeamColor ( playerTeam ) then the gang members who have Area 51 spawn in extample in (298.98865, 1815.90613, 3.71094) or should i use other functions can someone help me please , When the Team Color is same like the Radar Area Color then the ''Team'' spawn in extample (298.98865, 1815.90613, 3.71094)
-
Thank you ! this is perfect , now i know what function i need to use for the market You are best
-
Nothing happen when a player get in contact with marker.
-
Should i try this ? radararea4 = createRadarArea( 996.50629, 2048.92480, -80, 132, 255, 255, 255, 225 ) createBlip(939.85992, 2080.10718, 10.82031,62) marker3 = createMarker(927.96558, 2076.13110, 9.82031,"cylinder",2,0,0,255,255) addCommandHandler ( "comprarfabrica", function ( player ) local playerTeam = getPlayerTeam ( player ) if ( playerTeam ) then local r, g, b = getTeamColor ( playerTeam ) setRadarAreaColor ( radararea4, r, g, b, 155 ) local money = getPlayerMoney ( player ) if ( money >= 600000 ) then takePlayerMoney ( player, 600000 ) local color = getTeamColor ( playerTeam ) outputChatBox ( "#FFF000 [bASE] #FF0000 Sua gang comprei a base #00FF00 FABRICA!", player, 0, 0, 0, true ) end end end end ) function marker ( player ) if(isElementWithinMarker(player,marker3)) then outputChatBox ( "#FFF000 [bASE] #FF0000 Para comprar a base digita #00FF00 /comprarfabrica (600.000$)", player, 0, 0, 0, true) end with this i get bug : [2014-01-13 12:24:55] SCRIPT ERROR: 51\Fabrica.lua:19: ')' expected (to close '(' at line 5) near 'end' [2014-01-13 12:24:55] ERROR: Loading script failed: 51\Fabrica.lua:19: ')' expected (to close '(' at line 5) near 'end'
-
Thanks bro but i have a problem , when the player get in contact with marker nothing happen , when he write /comprarfabrica , then he get the chatbox from isElementWithinMarker.
-
Look this .-. Here is the full script radararea4 = createRadarArea( 996.50629, 2048.92480, -80, 132, 255, 255, 255, 225 ) createBlip(939.85992, 2080.10718, 10.82031,62) marker3 = createMarker(927.96558, 2076.13110, 9.82031,"cylinder",2,0,0,255,255) addCommandHandler ( "comprarfabrica", function ( player ) local playerTeam = getPlayerTeam ( player ) if ( playerTeam ) then local r, g, b = getTeamColor ( playerTeam ) if(isElementWithinMarker(player,marker3)) then outputChatBox ( "#FFF000 [bASE] #FF0000 Para comprar a base digita #00FF00 /comprarfabrica (600.000$)", player, 0, 0, 0, true) setRadarAreaColor ( radararea4, r, g, b, 155 ) local money = getPlayerMoney ( player ) if ( money >= 600000 ) then takePlayerMoney ( player, 600000 ) local color = getTeamColor ( playerTeam ) outputChatBox ( "#FFF000 [bASE] #FF0000 Sua gang comprei a base #00FF00 FABRICA!", player, 0, 0, 0, true ) end end end ) Whats wrong ? [2014-01-13 12:13:19] SCRIPT ERROR: 51\Fabrica.lua:21: unexpected symbol near ')'
-
i wanna crate a when player is in contact with marker then he get some text in chatbox but i get some bug marker1 = createMarker(2586.05591, 2840.79199, 9.82031,"cylinder",2,0,0,255,255) if isElementWithinMarker(thePlayer, marker1) then outputChatBox ( "#FFF000 [bASE] #FF0000 Sua gang comprei a base #00FF00 KACC!", player, 0, 0, 0, true ) end [2014-01-13 11:59:24] WARNING: marker\pro.lua:3: Bad argument @ 'isElementWithinMarker' [Expected element at argument 1, got nil]
-
I have problem with my script , nothing in de-bug , when i write /eventodeagle nothing happen. function mensagemEvento ( ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Admin" ) )) then outputChatBox ( "#00FFFFUm To Enter the Event write /participar in chat", getRootElement(), 255, 0, 0, true ) end addCommandHandler ( "eventodeagle", mensagemEvento ) end in acl.xml , i'm in Admin Group .
-
i'm lua begginer and need help at my base script , my script no work , i want when a player have a gang and he going in extample base Garagem and write /buygaragem on the marker he buy the base for 500.000 $ and the radar area get his gang color. can someone help me please radararea = createRadarArea( 2774.91992, 828.89435, 120, 206, 255, 255, 255, 225 ) createBlip(2820.63477, 971.96545, 10.75000,61) marker = createMarker(2814.67114, 972.01782, 9.75000,"cylinder",2,0,0,255,255) addCommandHandler("buygaragem", function(player) local playerTeam = getPlayerTeam ( playerTeam ) if ( playerTeam ) then r,g,b = getTeamColor(theTeam) setRadarAreaColor(radararea,r,g,b,155) local money = getPlayerMoney(player) if (money >= 500000) then takePlayerMoney(player, 500000) local color = getTeamColor ( playerTeam ) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 GARAGEM !", player, 0, 0, 0, true) end end end)
-
Here is my prop script but i have a problem , i want when a player get in marker he get in chatbox then he get this text in chatbox but that no work.. if(isElementWithinMarker(player,marker)) then outputChatBox ( "#00FFFF [PROP] To buy the prop write /prop1 (Cost:10.000$)", player, 0, 0, 0, true) i crated a command who let players buy the prop , but when he write the command /prop1 else return end local money = getPlayerMoney(player) if (money >= 10000) then takePlayerMoney(player, 10000) outputChatBox ( "#00FFFF [PROP] You buyed the PROP !", player, 0, 0, 0, true) When the player write /prop1 , then he get outputChatBox ( "#00FFFF [PROP] To buy the prop write /prop1 (Cost:10.000$)", player, 0, 0, 0, true) [/lua] can someone help me? i want when player / element get in contact with the marker he get outputChatBox ( "#00FFFF [PROP] To buy the prop write /prop1 (Cost:10.000$)", player, 0, 0, 0, true) [/lua] in chatbox
-
I Have problem with crash , my mta crash sometime and i have very big lag when i play mta. I modifacted my GTA:SA Effects,fonts and a lot other things. My fps fail from 100 to 10 etc etc very big lag becouse i use the mods here the mta diag : http://pastebin.mtasa.com/334152864