Jump to content

TheIceman1

Members
  • Posts

    296
  • Joined

  • Last visited

Everything posted by TheIceman1

  1. He upload my script. DONE! https://community.multitheftauto.com/index.php?p=resources&s=details&id=7093
  2. You have it on MTA community: Turf system:https://community.multitheftauto.com/index.php?p=resources&s=details&id=6772 Gang system:https://community.multitheftauto.com/index.php?p=resources&s=details&id=1514
  3. Try this: addEvent( 'onStartRobber',true ) addEvent( 'onEndRobber',true ) local timer,timerOpenBank local bankMarker = createMarker( 364.00500488281,163.38682556152,1008.3828125,"cylinder",3,150,0,0,255 ) local bankBip = createBlip ( 2416.5532226563, 1124.1168212891, 10.8203125, 36, 2 ) setElementInterior( bankMarker,3,364.00500488281,163.38682556152,1007.4828125 ) local bankColshape = createColCircle ( 2414.1735839844,1123.9982910156,10.8203125,1 ) function findMarker( source ) if isElement( source ) then local ret = false for _,v in pairs( getElementsByType 'marker' ) do if getElementData( v,'attack' ) == source then ret = v end end return ret end return false end function resetRobber( ) setElementData( bankMarker,'attack',nil ) setElementData( bankColshape,'attackShape',nil ) end function setRobberDefault( ) if isTimer( timerOpenBank ) then killTimer( timerOpenBank ) end if isTimer( timer ) then killTimer( timer ) end setElementData( bankMarker,'attack',nil ) setElementData( bankColshape,'attackShape',nil ) setElementAlpha( bankMarker,255 ) setElementData( bankMarker,'protected',nil ) setElementData( bankColshape,'protectedShape',nil ) triggerClientEvent( 'onSoundRobberyStop',root ) end addEventHandler( 'onColShapeLeave',bankColshape, function( LeaveElement,dim ) if getElementType( LeaveElement ) == 'player' then if getElementData( source,'attackShape' ) == LeaveElement then outputChatBox( "Bank Robbery: Complete",LeaveElement,255,0,0 ) setRobberDefault( ) end end end ) addEventHandler( 'onPlayerWasted',root, function( ) if findMarker( source ) then outputChatBox( "Bank Robbery: Failed",source,255,0,0 ) setRobberDefault( ) end end ) addEventHandler( 'onPlayerQuit',root, function( ) if findMarker( source ) then setRobberDefault( ) end end ) addEventHandler( "onMarkerHit",bankMarker, function( hitElement, matchingDimension ) if getElementType( hitElement ) == 'player' then if ( getPlayerTeam ( source ) == "Robbers" ) then if not getElementData( source,'attack' ) and not getElementData( source,'protected' ) then triggerClientEvent( hitElement,'onClientRobberMenu',hitElement,source ) else outputChatBox( 'Bank Robbery: You can rob the bank',hitElement,255,0,0 ) end end end end ) addEventHandler( 'onEndRobber',root, function( marker ) setElementData( bankMarker,'protected','y' ) setElementData( bankColshape,'protectedShape','y' ) if isTimer( timerOpenBank ) then killTimer( timerOpenBank ) end timerOpenBank = setTimer( setRobberDefault,10000,1 ) -- ????? ????? ??????? ???? ????? ????? ????? ???????? end ) addEventHandler( 'onStartRobber',root, function( ) setElementAlpha( bankMarker, 0 ) setElementData( bankMarker,'attack',source ) setElementData( bankColshape,'attackShape',source ) setPlayerWantedLevel( source,6 ) local cops = getPlayersInTeam ( getTeamFromName( "Police" ) ) outputChatBox( getPlayerName(source).." start bank rob!",cops,250,0,0 ) triggerClientEvent( 'onSoundRobbery',root ) if isTimer( timer ) then killTimer( timer ) end timer = setTimer( function( player,mark ) outputChatBox( "Bank Robbery: Complete",player,0,30,255 ) resetRobber( ) givePlayerMoney( player,21000 ) triggerClientEvent( 'onSoundRobberyStop',root ) triggerEvent( 'onEndRobber',player,mark ) end, 60000,1,source,bankMarker ) end )
  4. function destroyclan () local clan = getElementData ( source, "clan" ) local acc = getPlayerAccount ( source ) local clansroot = xmlLoadFile ("clans.xml") if ( clansroot ) then for i,v in ipairs (xmlNodeGetChildren(clansroot)) do local xmlnumber = xmlNodeGetAttribute (v,"name") xmlDestroyNode ( v ) xmlSaveFile ( clansroot ) xmlUnloadFile ( clansroot ) exports ["guimessages"] : outputServer ( source, "You destroy your clan!", 255, 255, 0 ) setAccountData ( acc, "Clan", false ) removeElementData ( source, "clan" ) end end end addEvent ( "destroyclan", true ) addEventHandler ( "destroyclan", root, destroyclan )
  5. I have new problem. Players make clans then in clans.xml said this : <clans> <clans name="Military"></clans> <clans name="SWAT"></clans> <clans name="FBI"></clans> </clans> But when i delete "Military" then in clans.xml said this(all clans are deleted): <clans> </clans> But i want this,when i delete "Military" then in clans.xml said this: <clans> <clans name="SWAT"></clans> <clans name="FBI"></clans> </clans> Code: local clansroot = xmlLoadFile ("clans.xml") if ( clansroot ) then for i,v in ipairs (xmlNodeGetChildren(clansroot)) do local clanname = xmlNodeGetAttribute (v,"name") xmlDestroyNode ( v ) xmlSaveFile ( clansroot ) xmlUnloadFile ( clansroot )
  6. TheIceman1

    Roads

    Use: getElementPosition()
  7. You mean this?But this dont work local root = xmlLoadFile ("clans.xml") clroot = xmlCreateChild(root, "clans") xmlNodeSetAttribute (clroot,"name", clan) end xmlSaveFile( root ) xmlUnloadFile ( root )
  8. When i make clan "Military" then in clans.xml said this: <clans> <clans name="Military"></clans> </clans> But when other player make new clan then in clans.xml said this and remove my clan: <clans> <clans name="SWAT"></clans> </clans> But i want this: <clans> <clans name="Military"></clans> <clans name="SWAT"></clans> </clans> Code local root = xmlLoadFile ("clans.xml") local clroot = xmlFindChild (root,"clans",0) if (clroot) then xmlNodeSetAttribute (clroot,"name", clan) else clroot = xmlCreateChild(root, "clans") xmlNodeSetAttribute (clroot,"name", clan) end xmlSaveFile( root ) xmlUnloadFile ( root ) Understand what i want?
  9. I dont understand what you want
  10. This? addCommandHandler("slap", function ( plr ) if getElementHealth(plr) =< 50 then setElementHealth ( plr, getElementHealth(plr) - 90 ); outputChatBox("True") else outputChatBox("False") end end )
  11. TheIceman1

    Scripter

    I can script whole server but i need 1 scripter to be faster.
  12. TheIceman1

    Scripter

    I can make server by myself,but i need 1 year for that,if there is 2 scripters its faster...
  13. Why this dont delete clan from "clans.xml"? function destroyclan () local clan = getElementData ( source, "clan" ) removeElementData ( source, "clan" ) local clans = xmlLoadFile ("clans.xml") local clansroot = xmlFindChild (clans,"clans",0) if (clansroot) then for i,v in ipairs (xmlNodeGetChildren(clansroot)) do local xmlnumber = xmlNodeGetAttribute (v,"name") if ( xmlnumber == clan ) then xmlDestroyNode ( v ) end xmlSaveFile ( clans ) xmlUnloadFile ( clans ) end end end addEvent ( "destroyclan", true ) addEventHandler ( "destroyclan", root, destroyclan )
  14. But i want delete only this: "FBI"> in this: "FBI">
  15. TheIceman1

    XML problem

    Zkj mi neče izbrisat clan iz "clans.xml"? function destroyclan () local clan = getElementData ( source, "clan" ) removeElementData ( source, "clan" ) local clans = xmlLoadFile ("clans.xml") local clansroot = xmlFindChild (clans,"clans",0) if ( clansroot ) then for i,v in ipairs (xmlNodeGetChildren(clansroot)) do local xmlnumber = xmlNodeGetAttribute (v,"clan") xmlDestroyNode ( v ) xmlSaveFile ( clans ) xmlUnloadFile ( clans ) end end end addEvent ( "destroyclan", true ) addEventHandler ( "destroyclan", root, destroyclan ) XML "FBI">
  16. I absolutely dont understand...
  17. TheIceman1

    Scripter

    I know scripting,but i can make whole server by myself,i need help...
  18. TheIceman1

    Scripter

    I dont have enought money.
×
×
  • Create New...