-
Posts
296 -
Joined
-
Last visited
Everything posted by TheIceman1
-
I looking for free scripter for my RPG server who will help me with scripting,if you are interested PM me! Visit my server(server is in development): 93.141.17.51:22030
-
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,"clan") xmlDestroyNode ( v ) xmlSaveFile ( clans ) xmlUnloadFile ( clans ) end end end addEvent ( "destroyclan", true ) addEventHandler ( "destroyclan", root, destroyclan ) XML "FBI">
-
Try this: function resetPlayerScore (thePlayer) local pname = getPlayerAccount( thePlayer ) setElementData(thePlayer,"kills",0) setElementData(thePlayer,"deaths",0) setAccountData( pname, "kills", 0) setAccountData( pname, "deaths", 0) outputChatBox(pname.." YOU SCORE KILL/DEATHS IS 0", getRootElement(), 255, 0, 0, true ) end addCommandHandler("resetscore", resetPlayerScore)
-
Client side: function createclan() if ( source == GUIEditor_Button[2] ) then local clan = guiGetText ( GUIEditor_Edit[1] ) setElementData ( localPlayer, "clan", clan) triggerServerEvent ( "createclan",localPlayer) end end addEventHandler ( "onClientGUIClick", root, createclan )
-
No,and edit "clanroot" to "root" in function xmlSaveFile, and xmlUnloadFile. But dont work.
-
I edit code,look at first post.
-
EDITED Nothing happens.
-
Why this dont upload "clans.xml"? Server side: function createclan() local clan = getElementData ( source, "clan" ) setAccountData ( getPlayerAccount(source), "Clan", getElementData ( source, "clan" ) ) local root = xmlLoadFile ("clans.xml") local clanroot = xmlFindChild (root,"clans",0) if (clanroot) then xmlNodeSetAttribute (clanroot,"clan", clan) end end addEvent ( "createclan", true ) addEventHandler ( "createclan", root, createclan ) clans.xml:
-
i want that when i click button then this should set my team to "Off duty",but this dont set my team to "Off Duty"
-
You dont understand what i want.
-
Why this dont set my team to "Off Duty"?No errors function endshift() if ( getAccountData ( getPlayerAccount(source), "offduty" ) == false ) then local team = getPlayerTeam ( source ) setAccountData ( getPlayerAccount ( source ), "offduty", true ) setAccountData ( getPlayerAccount ( source ), "teamoff", team ) setTimer( function(player) local team = getTeamFromName ( "Off Duty" ) setPlayerTeam ( player, getTeamFromName ( "Off Duty" ) ) local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( player, r, g, b ) end ,1000,1, source) else local team = getAccountData ( getPlayerAccount ( source), "teamoff" ) setPlayerTeam ( source, team ) end end addEvent ( "endshift", true ) addEventHandler( "endshift", root, endshift )
-
pa kak?! -.- komplicirano je...
-
Radil sam ga sa "setElementData".
-
Al problem je u tome kaj ja neznam radit mySQL,a nemogu naučit
