Jump to content

damien111

Members
  • Posts

    270
  • Joined

  • Last visited

Everything posted by damien111

  1. Like this? Cause this didnt work either , got the error : "Unkown Collumn test in field table", and test is the value i put in for 'name' local queryResult = mysql_query(mysqlHandler,"INSERT INTO housingdata(`name`, `address`, `type`, `interior`, `intlock`, `owner`, `price`, `value`, `income`, `status`, `x`, `y`, `z`, `csX`, `csY`, `csZ`, `csrX`, `csrY`, `csrZ`) VALUES("..name..","..address..","..typeint..",0,'0','LGC Housing Team',"..tonumber(price)..","..tonumber(price)..","..tonumber(income)..","..tonumber(status)..","..tonumber(x)..","..tonumber(y)..","..tonumber(z)..",".. tonumber(csx)..",".. tonumber(csy)..","..tonumber(csz)..","..tonumber(csrx)..","..tonumber(csry)..","..tonumber(csrz)..")")
  2. The module. https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL
  3. So like this? local queryResult = mysql_query(mysqlHandler,"INSERT INTO housingdata(name, address, type, interior, intlock, owner, price, value, income, status, x, y, z, csX, csY, csZ, csrX, csrY, csrZ) VALUES("..name..","..address..","..typeint..",0,'0','LGC Housing Team',"..tonumber(price)..","..tonumber(price)..","..tonumber(income)..","..tonumber(status)..","..tonumber(x)..","..tonumber(y)..","..tonumber(z)..",".. tonumber(csx)..",".. tonumber(csy)..","..tonumber(csz)..","..tonumber(csrx)..","..tonumber(csry)..","..tonumber(csrz)..")") EDIT: That didnt work either, its taking the values as collumn names?
  4. I cant figure out whats wrong with my "mysql" syntax..Can someone help me out? Heres the validator : http://www.w3.org/2005/01/yacker/uploads/MySQL/?lang=c&text=%22INSERT+INTO+housingdata%28name%2C+address%2C+type%2C+interior%2C+intlock%2C+owner%2C+price%2C+value%2C+income%2C+status%2C+x%2C+y%2C+z%2C+csX%2C+csY%2C+csZ%2C+csrX%2C+csrY%2C+csrZ%29+VALUES%28%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%29%22&action=validate+text It has the code in link and it will tell you whats wrong with it. But i dont know what its asking for i dont know mysql querys very well
  5. DELETED Learned you cant replace gui textures so i guess i will just use the maximap resource.
  6. Yeah everything is set up, they need to work on the voice chat area of mta a bit more..
  7. I can not call " setPlayerVoiceBroadcastTo " in my script, im not sure why. I used this function https://wiki.multitheftauto.com/wiki/set ... roadcastTo as seen in this code addEventHandler("onPlayerLogin",getRootElement(), function() for i,v in ipairs(getElementsByType("player"))do setPlayerVoiceIgnoreFrom ( source, v) end end) function callPlayer(caller,cmd,dialednumber) dialedPlayer = getPlayerFromName("dialednumber") setPlayerVoiceBroadcastTo ( caller, dialedPlayer) setPlayerVoiceBroadcastTo ( dialedPlayer, caller ) triggerEvent("onPlayerVoiceStart",caller) triggerEvent("onPlayerVoiceStart",dialedPlayer) end addCommandHandler("call",callPlayer) Are the voice functions of MTA now finished?
  8. I will start using locals i keep forgetting to and it keeps causing more and more problems lmao Thanks though!
  9. Hold on, now i amc reateing projectile client side and triggering a server side event to make a explosion. addEvent("startPedThrowing",true) addEventHandler("startPedThrowing",getRootElement(),function(ped) setTimer(function() x,y,z=getElementPosition(ped) molly = createProjectile ( ped,18,x,y,z+1,1.2) setTimer(function() x,y,z=getElementPosition(molly) triggerServerEvent("syncBoom",getRootElement(),x,y,z) end,3000,1) end,math.random(1000,5000),0) end) I can not get the x,y,z positions of it
  10. Well its just for looks so it doesnt relaly matter to be honest, is there a way to do it with them not being synced
  11. addEvent("startPedThrowing",true) addEventHandler("startPedThrowing",getRootElement(),function(ped) setPedAnimation(ped, nil, nil) setPedControlState ( ped, "fire", true) setTimer(function() setPedControlState(ped,"fire",false) end, 1000, 1) randomAnimation = math.random(1,5) if(randomAnimation==1)then setPedAnimation(ped,"RIOT","RIOT_ANGRY",-1,true,true,true,true) elseif(randomAnimation==2)then setPedAnimation(ped,"RIOT","RIOT_ANGRY_B",-1,true,true,true,true) elseif(randomAnimation==3)then setPedAnimation(ped,"RIOT","RIOT_shout",-1,true,true,true,true) elseif(randomAnimation==4)then setPedAnimation(ped,"RIOT","RIOT_CHANT",-1,true,true,true,true) elseif(randomAnimation==5)then setPedAnimation(ped,"RIOT","RIOT_challenge",-1,true,true,true,true) end end) The peds already have animations going and this has no effect on it, and i cant figure out why
  12. Im working on a riot event script and i cant figure out how to make peds throw tons of molotovs at random times..
  13. SolidSnake, can i really convert Cleo scripts?
  14. Is there a way to add machine gun fire to the dodo, so i can have multiple fighters, and same with the tanks, i need two tanks, if so, where should i start, function wise?
  15. Add this to server side function giveMoney(localP ) -- INSERT GIVE MONEY PART HERE, and as the player argument use localP , as it is carried from the client side script to the server side script with the trigger! end addEvent( "giveMoney", true ) addEventHandler( "giveMoney", getRootElement(), giveMoney) and where you gave money client side , replace it with localP = getLocalPlayer() triggerServerEvent ( "onGreeting", getLocalPlayer(), localP ) im at school , pm me if you need a better explanation
  16. On servers ive seen that all of one type of car has moded handeling, can someone show me how to do this? Is there a way to give vehicles the handeling from the downloaded config file for the handeling? I need this to make like, 4 or 5 planes the same handeling as the nevada. If someone can help me, that would be great. PS ~ Sorry for my choppy english, tired as hell
  17. Yeah, Thanks again i guess I made it like 3000 times more complex with a bunch of shit for the WW2 server so
  18. And actually this has a bit more
  19. I cut out alot of it, i took some basics as i was learning from it, i had waves of NPC's and such, but no, i didn't.
  20. I need help with getting this to work, there will probally be more questions after this on this topic, okay, so right now , the problem is that i get a debug error when i try to get the teamcolor..Im not sure why, as it is all defined, any ideas? local pArea = createRadarArea( -1442.904296875, -971.251953125, 100, 100, 0, 0, 0, 125 ) local pCuboid = createColRectangle( -1442.904296875, -971.251953125, 100, 100 ) BigSmokes = createTeam("Nazis", 255, 0, 255) addEventHandler("onResourceStart",resourceRoot,function() end ) addEventHandler('onColShapeHit', root, function( p ) -- you should have added player param here local pTeam = getPlayerTeam( p ) local iR, iG, iB = getTeamColor( pTeam ) local rR, rG, rB = getRadarAreaColor ( pArea ) if (getPlayerTeam( p )) then if( source == pCuboid ) then if ( iR == rR and iG == rG and iB == rB ) then else if(getElementData( aCuboid, "TurfInProgress" )) then else setRadarAreaFlashing ( aArea, true ) setElementData( aCuboid, "TurfInProgress", true ) wave1 = setTimer( function() setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaColor ( aArea, tR, tG, tB, 125 ) setRadarAreaFlashing ( aArea, false) country = getElementData( p, "Country" ) setElementData( aArea, "CountryOwned", country) end, 60000, 1 ) end end end end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end ) addEventHandler( "onPlayerWasted", getRootElement( ), function() if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end )
×
×
  • Create New...