CowTurbo
Members-
Posts
385 -
Joined
-
Last visited
Everything posted by CowTurbo
-
[RSGP] Free Server Hosting! || THIS DEAL IS OVER!! ||
CowTurbo replied to Thomas_Matthew's topic in Hosting solutions
Can i get some servers ? 1 - 2 ? -
for begin its good.
-
!bump
-
as far as i konw 'lol' means laughting. Why else should i post 'lol' ?
-
im not drunk and im not idiot
-
lol,
-
no need request. https://community.multitheftauto.com/index.php?p=resources&s=details&id=665
-
WTF?! Why the text wasnt apper, i gonna edit it. EDIT: Some admins? Why the text wont apper even when i press edit button there is text ? EDIT2:http://www.mediafire.com/?wl9gyc41u1sdpd2 i have upload it for you, and heres the text down the code which i added to earlier post: I added for you new option. You can chose enter marker high. This is for uping arrow more higher. Change the code from here with your server.lua ( was i'm right ? ) with that one ( if its not server.lua, then its the server side script replace with that one ) Good luck, and thx for choosing housing system The marker is done for you ( size and high is chosen with my eyes, do no does it good for u ? )
-
[REL] JLua Multiple Java Compiler GUI -War Of Empire-
CowTurbo replied to laserlaser's topic in Resources
translate the EDIT one too ? -
enterMarkerType = "arrow" -- Default ( corona ) enterMarkerSize = 1.2 -- Default ( 0.5 ) enterMarkerColor = 255, 100, 255 -- Default ( 255,100,255 ) housesCanBuy = 2 -- You can chose 1 or 2, if u but 3,4,5... or 0 then script wont gonna work, dont tell i havent warn you. Default ( 1 ) houseMarkerHigh = 0.6 -- The 0 point is placed as 'corona' marker normal place. You can move the arrow up(+)/down(-) with it. The arrow gots some sort of bug. If you set it more then 0.5 then it goes underground. Do no what cause it. gResRoot = getResourceRootElement(getThisResource()) function loadAllHouses () local root = xmlLoadFile ("homes.xml") local houseroot = xmlFindChild (root,"houses",0) if (houseroot) then allHouses = {} for i,v in ipairs (xmlNodeGetChildren(houseroot)) do local x = xmlNodeGetAttribute (v,"x") local y = xmlNodeGetAttribute (v,"y") local z = xmlNodeGetAttribute (v,"z") local lx = xmlNodeGetAttribute (v,"lx") local ly = xmlNodeGetAttribute (v,"ly") local lz = xmlNodeGetAttribute (v,"lz") local number = xmlNodeGetAttribute (v,"num") if not (xmlNodeGetAttribute (v,"owner") == "") then local marker = createMarker (tonumber(x),tonumber(y),tonumber(z),"corona",0.8,255,0,0,0) setElementData (marker,"housenumber",tonumber(number)) local marker2 = createMarker (tonumber(lx),tonumber(ly),tonumber(lz+houseMarkerHigh),enterMarkerType,enterMarkerSize,enterMarkerColor,255) setElementData (marker2,"housenumber2",tonumber(number)) pickup = createPickup (tonumber(x),tonumber(y),tonumber(z),3,1272,0) setElementData ( pickup, "housenumber", number ) else local marker2 = createMarker (tonumber(lx),tonumber(ly),tonumber(lz+houseMarkerHigh),enterMarkerType,enterMarkerSize,enterMarkerColor,255) setElementData (marker2,"housenumber2",tonumber(number)) local marker = createMarker (tonumber(x),tonumber(y),tonumber(z),"corona",0.8,0,255,0,0) setElementData (marker,"housenumber",tonumber(number)) pickup = createPickup (tonumber(x),tonumber(y),tonumber(z),3,1273,0) setElementData ( pickup, "housenumber", number ) end -- outputDebugString ("House " .. tostring(number) .. " loaded!") end end end addEventHandler("onResourceStart",gResRoot, loadAllHouses) addEventHandler ("onMarkerHit",getRootElement(), function(hitElement, dimension) if (getElementType (hitElement) == "player") and not (isPedInVehicle (hitElement)) then if (getElementData (source,"housenumber")) then local housenumber = getElementData (source,"housenumber") --outputChatBox (tostring(housenumber),hitElement,255,0,0,false) local root = xmlLoadFile ("homes.xml") local houseHeadRootNode = xmlFindChild (root,"houses",0) local houseRootNode = xmlFindChild (houseHeadRootNode,"house",tonumber(housenumber)) if (tostring(xmlNodeGetAttribute (houseRootNode,"owner")) == "") then triggerClientEvent (hitElement,"viewHouseGUIwindow",hitElement,"For Sell!",tostring(xmlNodeGetAttribute (houseRootNode,"cost")),housenumber,tostring(xmlNodeGetAttribute (houseRootNode,"sellprice")),tostring(xmlNodeGetAttribute (houseRootNode,"street"))) xmlUnloadFile (root) else triggerClientEvent (hitElement,"viewHouseGUIwindow",hitElement,tostring(xmlNodeGetAttribute (houseRootNode,"owner")),tostring(xmlNodeGetAttribute (houseRootNode,"cost")),housenumber,tostring(xmlNodeGetAttribute (houseRootNode,"sellprice")),tostring(xmlNodeGetAttribute (houseRootNode,"street"))) xmlUnloadFile (root) end end end end) addEventHandler ("onMarkerHit",getRootElement(), function(hitElement, dimension) if (getElementType (hitElement) == "player") and not (isPedInVehicle (hitElement)) then if (getElementData (source,"housenumber2")) then local housenumber = getElementData (source,"housenumber2") --outputChatBox (tostring(housenumber),hitElement,255,0,0,false) triggerEvent ("HouseSystemEnterHouse",hitElement,housenumber) xmlUnloadFile (root) end end end) addEvent("HouseSystemEnterHouse",true) addEvent("HouseSystemBuyHouse",true) addEvent("HouseSystemSellHouse",true) addEvent("tryInterior",true) addEvent("createhome",true) addEventHandler ("HouseSystemBuyHouse", getRootElement(), function(housenumber) if ( housesCanBuy == 1 ) then local root = xmlLoadFile ("homes.xml") local houseHeadRootNode = xmlFindChild (root,"houses",0) local houseRootNode = xmlFindChild (houseHeadRootNode,"house",tonumber(housenumber)) local price = xmlNodeGetAttribute (houseRootNode,"cost") local owner = xmlNodeGetAttribute (houseRootNode,"owner") local sellPrice = xmlNodeGetAttribute (houseRootNode,"sellprice") local street = xmlNodeGetAttribute (houseRootNode,"street") local x,y,z = getElementPosition ( source ) if not (isGuestAccount (getPlayerAccount(source))) then if (owner == "") and (getPlayerMoney (source) >= tonumber(price)) then local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local house = getAccountData ( playeraccount, "house" ) if (house ~= "yes" ) then setAccountData ( playeraccount, "house", "yes" ) setAccountData ( playeraccount, "price", price ) setAccountData ( playeraccount, "number", housenumber ) setAccountData ( playeraccount, "sell", sellPrice ) setAccountData ( playeraccount, "street", street ) setAccountData ( playeraccount, "housex", x ) setAccountData ( playeraccount, "housey", y ) setAccountData ( playeraccount, "housez", z ) takePlayerMoney (source,tonumber(price)) xmlNodeSetAttribute (houseRootNode,"owner",getAccountName(getPlayerAccount(source))) outputChatBox ("Congratulations, you are the new owner!",source,255,200,0,false) outputChatBox ("Price: ".. tostring(price) .. "$!",source,255,200,0,false) for i,v in ipairs ( getElementsByType("pickup")) do local number = getElementData ( v, "housenumber" ) if ( number == housenumber ) then setPickupType ( v, 3, 1272 ) end end xmlSaveFile (root) else outputChatBox ("You have house already!",source,255,0,0,false) end elseif not (owner == "") then outputChatBox ("Sorry, This house is already bought!",source,255,0,0,false) elseif (getPlayerMoney (source) < tonumber(price)) then outputChatBox ("Sorry, you are too poor!",source,255,0,0,false) end else outputChatBox ("You are too poor or house is bought!",source,255,0,0,false) end end xmlUnloadFile (root) elseif ( housesCanBuy == 2 ) then local root = xmlLoadFile ("homes.xml") local houseHeadRootNode = xmlFindChild (root,"houses",0) local houseRootNode = xmlFindChild (houseHeadRootNode,"house",tonumber(housenumber)) local price = xmlNodeGetAttribute (houseRootNode,"cost") local owner = xmlNodeGetAttribute (houseRootNode,"owner") local sellPrice = xmlNodeGetAttribute (houseRootNode,"sellprice") local street = xmlNodeGetAttribute (houseRootNode,"street") local x,y,z = getElementPosition ( source ) if not (isGuestAccount (getPlayerAccount(source))) then if (owner == "") and (getPlayerMoney (source) >= tonumber(price)) then local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local house = getAccountData ( playeraccount, "house" ) if (house ~= "yes" ) then setAccountData ( playeraccount, "house", "yes" ) setAccountData ( playeraccount, "price", price ) setAccountData ( playeraccount, "number", housenumber ) setAccountData ( playeraccount, "sell", sellPrice ) setAccountData ( playeraccount, "street", street ) setAccountData ( playeraccount, "housex", x ) setAccountData ( playeraccount, "housey", y ) setAccountData ( playeraccount, "housez", z ) takePlayerMoney (source,tonumber(price)) xmlNodeSetAttribute (houseRootNode,"owner",getAccountName(getPlayerAccount(source))) outputChatBox ("Congratulations, you are the new owner!",source,255,200,0,false) outputChatBox ("Price: ".. tostring(price) .. "$!",source,255,200,0,false) for i,v in ipairs ( getElementsByType("pickup")) do local number = getElementData ( v, "housenumber" ) if ( number == housenumber ) then setPickupType ( v, 3, 1272 ) end end xmlSaveFile (root) else local house2 = getAccountData ( playeraccount, "house2" ) if (house2 ~= "yes" ) then setAccountData ( playeraccount, "house2", "yes" ) setAccountData ( playeraccount, "price2", price ) setAccountData ( playeraccount, "number2", housenumber ) setAccountData ( playeraccount, "sell2", sellPrice ) setAccountData ( playeraccount, "street2", street ) setAccountData ( playeraccount, "housex2", x ) setAccountData ( playeraccount, "housey2", y ) setAccountData ( playeraccount, "housez2", z ) takePlayerMoney (source,tonumber(price)) xmlNodeSetAttribute (houseRootNode,"owner",getAccountName(getPlayerAccount(source))) outputChatBox ("Congratulations, you are the new owner!",source,255,200,0,false) outputChatBox ("Price: ".. tostring(price) .. "$!",source,255,200,0,false) for i,v in ipairs ( getElementsByType("pickup")) do local number = getElementData ( v, "housenumber" ) if ( number == housenumber ) then setPickupType ( v, 3, 1272 ) end end xmlSaveFile (root) else outputChatBox ( "You cant buy more than 2 houses!", source, 255,0,0 ) end end elseif not (owner == "") then outputChatBox ("Sorry, This house is already bought!",source,255,0,0,false) elseif (getPlayerMoney (source) < tonumber(price)) then outputChatBox ("Sorry, you are too poor!",source,255,0,0,false) end else outputChatBox ("You are too poor or house is bought!",source,255,0,0,false) end end xmlUnloadFile (root) end end) addEventHandler ("HouseSystemSellHouse", getRootElement(), function(housenumber) if ( housesCanBuy == 1 ) then root = xmlLoadFile ("homes.xml") local houseHeadRootNode = xmlFindChild (root,"houses",0) local houseRootNode = xmlFindChild (houseHeadRootNode,"house",tonumber(housenumber)) local price = xmlNodeGetAttribute (houseRootNode,"sellprice") local owner = xmlNodeGetAttribute (houseRootNode,"owner") if not (isGuestAccount (getPlayerAccount(source))) then if (owner == getAccountName(getPlayerAccount(source))) then local playeraccount = getPlayerAccount ( source ) setAccountData ( playeraccount, "house", "no" ) setAccountData ( playeraccount, "price", "---" ) setAccountData ( playeraccount, "number", "---" ) setAccountData ( playeraccount, "sell", "---" ) setAccountData ( playeraccount, "street", "---" ) setAccountData ( playeraccount, "housex", "---" ) setAccountData ( playeraccount, "housey", "---" ) setAccountData ( playeraccount, "housez", "---" ) givePlayerMoney (source,tonumber(price)) xmlNodeSetAttribute (houseRootNode,"owner","") xmlNodeSetAttribute (houseRootNode,"lockStatus","unlock") outputChatBox ("Congratulations, you have sold the home!",source,255,200,0,false) outputChatBox ("Obtain: ".. tostring(price) .. "$!",source,255,200,0,false) xmlSaveFile (root) for i,v in ipairs ( getElementsByType("pickup")) do local number = getElementData ( v, "housenumber" ) if ( number == housenumber ) then setPickupType ( v, 3, 1273 ) end end elseif not (owner == getAccountName(getPlayerAccount(source))) then outputChatBox ("This isn't your house!",source,255,200,0,false) end else outputChatBox ("Please log in!",source,255,200,0,false) end xmlSaveFile(root) elseif ( housesCanBuy == 2 ) then local root = xmlLoadFile ("homes.xml") local houseHeadRootNode = xmlFindChild (root,"houses",0) local houseRootNode = xmlFindChild (houseHeadRootNode,"house",tonumber(housenumber)) local price = xmlNodeGetAttribute (houseRootNode,"sellprice") local owner = xmlNodeGetAttribute (houseRootNode,"owner") if not (isGuestAccount (getPlayerAccount(source))) then if (owner == getAccountName(getPlayerAccount(source))) then local playeraccount =
-
addEvent ("login", true) addEvent ("register", true) addEvent ("checkaccname", true) function login (uname, pass) local account = getPlayerName ( uname ) if ( account ~= false ) then logIn ( source, account, tostring(pass) ) triggerClientEvent ( "hide", source ) else outputChatBox ( "Wrong username or password!", source, 255, 255, 0 ) end end addEventHandler ( "login", getRootElement(), login ) function register (uname, pass) if ( pass ~= "" and pass ~= nil ) then local accountAdded = addAccount( uname, pass ) if ( accountAdded ) then outputChatBox ( "Thank you " .. getPlayerName(source) .. ", you're now registed, Username : " .. uname .. " Password : " .. pass .. " remember it for login !", source ) logIn ( source, uname, tostring(pass) ) triggerClientEvent ( "hide", source ) else outputChatBox ( "Error creating account, contact the server admin", source ) end else outputChatBox ( "Error creating account, Enter your password", source ) end end addEventHandler ( "register", getRootElement(), register ) function check () account = getPlayerAccount ( source ) name = getPlayerName ( source) if name ~= "guest" then triggerClientEvent ( "hide", source ) else triggerClientEvent ( "show", source ) end end addEventHandler ( "checkaccname", getRootElement(), check ) function login () name = getPlayerName ( source ) if name ~= "guest" then triggerClientEvent ( "hide", source ) else triggerClientEvent ( "show", source ) end end addEventHandler ( "onPlayerLogin", getRootElement(), login ) You were name = getPlayerName ( account) have to be name = getPlayerName ( source)
-
ammunation = {{"Brass Knuckle","1","15"},{"Knife","1","250"},{"Golf Club","1","20"},{"Chainsaw","1","500"},{"Pistol","51","100"},{"Silenced","51","125"},{"Deagle","77","300"},{"Shotgun","10","100"},{"Sawn-Off","20","100"},{"SPAZ-12","70","500"},{"UZI","100","125"},{"MP5","120","300"},{"Tec-9","100","100"},{"AK-47","60","200"},{"M4","50","200"},{"Sniper","10","150"},{"Country Sniper","10","100"},{"Rocket","1","1000"},{"Apple x1","1","15"},{"Apple","10","125"},{"Gas x1","1","25"},{"Gas","10","200"},{"Flowers","1","1"}} addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()), function() theAmmuNationWindow = guiCreateWindow(0.0012,0.5633,0.2738,0.435,"Ammu Nation",true) guiSetVisible (theAmmuNationWindow,false) guiWindowSetMovable(theAmmuNationWindow,false) guiWindowSetSizable(theAmmuNationWindow,false) theAmmuNationGridlist = guiCreateGridList(9,28,197,128,false,theAmmuNationWindow) guiGridListSetSelectionMode(theAmmuNationGridlist,0) theAmmuNationGridlistCol1 = guiGridListAddColumn(theAmmuNationGridlist,"Weapon Name",0.45) theAmmuNationGridlistCol2 = guiGridListAddColumn(theAmmuNationGridlist,"Ammo",0.15) theAmmuNationGridlistCol3 = guiGridListAddColumn(theAmmuNationGridlist,"$",0.2) theAmmuNationBuyButton = guiCreateButton(9,162,198,40,"Buy!",false,theAmmuNationWindow) theAmmuNationCloseButton = guiCreateButton(9,208,198,40,"Close",false,theAmmuNationWindow) for i,v in ipairs (ammunation) do local row = guiGridListAddRow (theAmmuNationGridlist) guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol1,v[1],false,false) guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol2,v[2],false,false) guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol3,v[3] .. "$",false,true) end ammuNationMarker = createMarker (295.91,-38.09,1000.51,"cylinder",1,0,255,255,127) setElementInterior (ammuNationMarker,1) setElementDimension (ammuNationMarker,1) end ) 1. You goted in tabel unneeded arguemtns, even without " and ". 2. For that error, you ended function to early, one end was unneeded ( replaced with ")" ) [ To finish the addEventHandler ] This isnt tested, but should work
-
You wanna autologin only for admins ? Why the serial is needed then ?
-
i think yea, if you make somesort of player serial save ( maybe somewhere to .xml ) and then see is playerserial == xmlserial then log him in ( save pass,user to xml too ? )
-
they can even stole at one server that spido. but i wont tell you how to stole.
-
all script what you were wanted are at community.multitheftauto.com
-
was that post needed ?
-
lol, you have to make different files. ramp.lua and meta.xml
-
setPedStat ( source, skill0, 999 ) you should take a look to there.
-
theMarker = createMarker ( 0, 0, 3, "cylinder", 5, 255, 255, 255, 255 ) -- maybe remove that 'local' thing ? not sure function attach ( hitElement, matchingDim ) if ( isPedInVehicle ( hitElement)) then local Pvehicle = getpedOccupiedVehicle ( hitElement ) attachElements ( Pvehicle, theMarker ) else outputChatBox ( "Only vehicles can be attached here" ) end end addEventHandler ( "onMarkerHit", theMarker, attach ) function detach (thePlayer, commandName) local attachedElements = getAttachedElements ( getPedOccupiedVehicle ( thePlayer )) -- why was here source ? detachElements ( Pvehicle, attachedElements ) -- why was here source too? end addCommandHandler ( "detach", detach ) if i was sure then someone in the irc chat told me that getElementType on corona marker hit doesnt work or something like that.. maybe now it works ?
-
never seen that
-
yea, my bad, i writed that fast..
-
function healFlowers (attacker, attackerweapon, bodypart, loss) theHealth = getElementHealth (source) if (attackerweapon == 14) and (loss > 1) and ( theHealth < 80 ) then cancelEvent() setElementHealth ( source, 100 ) takePlayerMoney (source, 100) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage", getRootElement(), healFlowers ) maybe something like that. -Hospital local EnterMarker = createMarker( 1607.22, 1816.25, 11.82, 'arrow', 2.0, 0, 255, 0, 150 ) function MarkerHit( hitElement, matchingDimension ) setElementInterior ( hitElement, 3, 389.85, 173.49, 1008.38 ) setElementDimension ( hitElement, 1 ) end addEventHandler( "onMarkerHit", EnterMarker, MarkerHit ) setElementDimension ( player argument, int dimension )
-
ping collumn is default there.