Jump to content

WolfPire

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by WolfPire

  1. no not possible https://wiki.multitheftauto.com/wiki/SpawnPlayer True, nothing can stop the download at this rate. The "Play" game-mode did it, so why not us?
  2. What do you mean exactly by that?
  3. I mean... Imagine that you enter a server, and instead of seeing a black screen. You get directly spawned while the download goes on. That's what i want to do. Thanks for the post, appreciate it.
  4. Can someone show me how to start a resource before any other starts? Example... if i want to spawn the player while it waits the download. How do i do that? Thanks in advance, - WolfPire
  5. Well come to think about it i think Map Editors don't delete any Vertex Color... Tho' that. I can refer kinda like to the original model color, without any vertex color added by world.
  6. Already deleted all lamp post. but yeah, i was expecting that each object had it's vertex color so i would have to delete one by one, and that'll be hard... The question is... How did the map editor's authors did it? There should be a way to disable all of them, and i think the only way is.... Shaders... I never see how the map editor authors did it, what do you mean ? I mean disable all "Vertex Colors" =P
  7. Already deleted all lamp post. but yeah, i was expecting that each object had it's vertex color so i would have to delete one by one, and that'll be hard... The question is... How did the map editor's authors did it? There should be a way to disable all of them, and i think the only way is.... Shaders...
  8. So ok, i had to RE-DO the whole code. It stops in the marked station thanks to an object which is literally attached to it. The problem now is "Sync", some players found the train "choppy" or "not moving at all". So, i was wondering if you guys could give me a hand. Server function TrainSpawn() if not Train1 then Train1 = createVehicle(538,1729.6799316406,-1951.4211425781,13.546875) Pass1 = createVehicle(437,1772,-1957,14) createBlipAttachedTo(Train1,42,2) attachElements(Pass1,Train1,0,-14,-1.1) Pilot = createPed(61,1699.9200439453,-1950.8029785156,14.1171875) setVehicleDamageProof (Pass1,true) setTrainDerailable (Train1,false) warpPedIntoVehicle(Pilot, Train1) triggerClientEvent("manageStreaming", root, Train1, Pilot, Pass1) player = getElementsByType("player") for i,v in ipairs(player) do setElementSyncer ( Train1, v ) setElementSyncer ( Pass1, v ) setElementSyncer ( Pilot, v ) end end end addEvent("onResourceDownloaded",true) addEventHandler("onResourceDownloaded",root,TrainSpawn) Client ---------------------Col---------------------------------------------- LsUnity = createColSphere(1787,-1953.9764404297,14.546875,3) LsMarket = createColSphere(919,-1467.8107910156,-2.0554099082947,3) SfCanberry = createColSphere(-1944.2680664063,40.08346557617,26.58346557617,3) LvYB = createColSphere(1224.7739257813,2633.1916503906,11.2203125,3) LvLinden = createColSphere(2866.80078125,1481.5402832031,11.2203125,3) ---------------------------------------------------------------------- addEvent("manageStreaming", true) addEventHandler("manageStreaming", root, function(Train1, Pilot, Pass1) setElementStreamable ( Train1, false ) setElementStreamable ( Pass1, false ) setElementStreamable ( Pilot, false ) Train = Train1 Pilot2 = Pilot setTimer(accel, 5000, 1) setTimer(det, 50, 1) end ) Det = createObject(1337, 1772,-1957,14) function TrainStopLSUnity(hitElement) if hitElement == Det then outputChatBox('Attention! The Train has arrived to Unity Station! (LS) You have 1 minutes to buy a ticket before the train leaves!',200,0,0) setTimer(stop, 50, 1) setTimer(TrainLeaveLSUnity,10000,1) end end addEventHandler('onClientColShapeHit',LsUnity,TrainStopLSUnity) function TrainLeaveLSUnity() outputChatBox('The Train has left Unity Station (LS), next stop: Market Station (LS)',0,200,0) setPedControlState(Pilot2,"brake_reverse",false) setTimer(accel, 50, 1) end function TrainStopLSMarket(hitElement) if hitElement == Det then outputChatBox('Attention! The Train has arrived to Market Station! (LS) You have 5 minutes to buy a ticket before the train leaves!',200,0,0) setTimer(stop, 5000, 1) setTimer(setTrainSpeed, 3500, 1, Train, 0) setTimer(TrainLeaveLSMarket,5000,1) end end addEventHandler('onClientColShapeHit',LsMarket,TrainStopLSMarket) function TrainLeaveLSMarket() outputChatBox('The Train has left Market Station, next stop: Canberry Station (SF)',0,200,0) setPedControlState(Pilot2,"brake_reverse",false) setTimer(accel, 5000, 1) end function TrainStopSfCanberry(hitElement) if hitElement == Det then outputChatBox('Attention! The Train has arrived to Caberry Station! (SF) You have 5 minutes to buy a ticket before the train leaves!',200,0,0) setTimer(stop, 5000, 1) setTimer(TrainLeaveSfCanberry,5000,1) end end addEventHandler('onClientColShapeHit',SfCanberry,TrainStopSfCanberry) function TrainLeaveSfCanberry() outputChatBox('The Train has left Canberry Station, next stop: Yellow Bell Station (LV)',0,200,0) setPedControlState(Pilot2,"brake_reverse",false) setTimer(accel, 5000, 1) end function TrainStopLVYellowBell(hitElement) if hitElement == Det then outputChatBox('Attention! The Train has arrived to Yellow Bell Station! (LV) You have 5 minutes to buy a ticket before the train leaves!',200,0,0) setTimer(stop, 5000, 1) setTimer(TrainLeaveLvYellowBell,5000,1) end end addEventHandler('onClientColShapeHit',LvYB,TrainStopLVYellowBell) function TrainLeaveLvYellowBell() outputChatBox('The Train has left Yellow Bell Station, next stop: Linden Station (LV)',0,200,0) setPedControlState(Pilot2,"brake_reverse",false) setTimer(accel, 5000, 1) end function TrainStopLVLinden(hitElement) if hitElement == Det then outputChatBox('Attention! The Train has arrived to Linden Station! (LV) You have 5 minutes to buy a ticket before the train leaves!',200,0,0) setTimer(stop, 5000, 1) setTimer(TrainLeaveLvYellowBell,5000,1) end end addEventHandler('onClientColShapeHit',LvLinden,TrainStopLVLinden) function TrainLeaveLvLinden() outputChatBox('The Train has left Yellow Bell Station, next stop: Unity Station (LS)',0,200,0) setPedControlState(Pilot2,"brake_reverse",false) setTimer(accel, 9000, 1) end function det() if not hand then hand = addEventHandler("onClientRender", root, detz) outputChatBox("Yes") end end function detz() dx, dy, dz = getElementPosition(Train) drx, dry, drz = getElementRotation(Train) setElementPosition( Det, dx, dy, dz ) setElementRotation( Det, drx, dry, drz ) end function accel() setPedControlState(Pilot2,"accelerate",true) end function stop() setPedControlState(Pilot2,"brake_reverse",true) end addEventHandler("onClientResourceStart",resourceRoot, <--- This could be the reason, i'm not sure. function() triggerServerEvent("onResourceDownloaded", root) end )
  9. 1 year is not enough. I'm not professional, nor newbie. Edit: Well, rather than getting help, we just fell into a little argument, so yeah, sorry for being so harsh. I really need help, can haz pl0x?
  10. I found your statement really offensive, as i have been in MTA since DP 2 and i've been learning LUA over 1 year now. I jsut don't master this area. Even if i trigger for one player, it will trigger on every. Show some respect.
  11. I'm not sure if it's this or idk. But whenever i drop the bomb of my rustler (Right Control) It triggers that to all the players around. Can you guys please help me? Client function RustlerNW() d = 5 r = getPedRotation ( localPlayer ) x, y, z = getElementPosition ( localPlayer ) y = y + ( ( math.sin ( math.rad ( r ) ) ) * d ) ground = getGroundPosition ( x, y, z ) triggerServerEvent( "RustlerNWS", root, localPlayer, x, y, ground, r ) bindKey("rctrl", "down",bombinit) end addCommandHandler("rnw", RustlerNW) bindKey("c", "down", function() if not MT then MT = setTimer(fire, 1000, 1) end end ) function bombinit() if localPlayer then triggerServerEvent("dropBomb",root) end end addEvent("bombExplode",true) addEventHandler("bombExplode", root, function(BarrelC) if BarrelC then addEventHandler("onClientRender", root, explode) barrel = BarrelC end end ) function explode() if barrel then bx, by, bz = getElementPosition(barrel) groundBZ = getGroundPosition( bx, by, bz ) unbindKey("rctrl", "down") if bz <= groundBZ+3 then triggerServerEvent("goBoom",root, barrel, bx, by, bz, localPlayer) removeEventHandler("onClientRender", root, explode) end end end function fire() local v = getPedOccupiedVehicle( localPlayer ) local x, y, z = getElementPosition(v) local rx, ry, rz = getElementRotation(v) local velX, velY, velZ = getElementVelocity (v) local speed = ( velX^2 + velY^2 + velZ^2 ) ^ ( 0.5 ) if getElementModel( v ) == 476 then m1 = createProjectile( localPlayer, 19, x + 8, y + 5, z - 5, speed*2, nil, rx, ry, rz, velX*2.0, velY*2.0, velZ*2.0) m2 = createProjectile( localPlayer, 19, x + 4, y + 5, z - 5, speed*2, nil, rx, ry, rz, velX*2.0, velY*2.0, velZ*2.0) m3 = createProjectile( localPlayer, 19, x + -4, y + 5, z - 5, speed*2, nil, rx, ry, rz, velX*2.0, velY*2.0, velZ*2.0) m4 = createProjectile( localPlayer, 19, x + -8, y + 5, z - 5, speed*2, nil, rx, ry, rz, velX*2.0, velY*2.0, velZ*2.0) MT = nil end end Server local RustlerNW = {} local missile1 = {} local missile2 = {} local missile3 = {} local missile4 = {} local Barrel = {} local AC1 = {} local AC2 = {} local Satelite = {} addEvent("RustlerNWS",true) addEventHandler("RustlerNWS",root, function( localPlayer, x, y, ground, r ) RustlerNW[localPlayer] = createVehicle(476, x + 3, y + 2, ground + 3, 0, 0, r ) missile1[localPlayer] = createObject(3790, 0, 0 ,0) missile2[localPlayer] = createObject(3790, 0, 0 ,0) missile3[localPlayer] = createObject(3790, 0, 0 ,0) missile4[localPlayer] = createObject(3790, 0, 0 ,0) Barrel[localPlayer] = createObject(1225, 0, 0, 0) AC1[localPlayer] = createObject(3812, 0, 0 ,0) AC2[localPlayer] = createObject(3812, 0, 0 ,0) Satelite[localPlayer] = createObject(3031, 0, 0 ,0) attachElements(missile1[localPlayer], RustlerNW[localPlayer], -5.3, 0.6, -0.5, 0, 0, 270 ) attachElements(missile2[localPlayer], RustlerNW[localPlayer], -1.3, 0.6, -0.8, 0, 0, 270 ) attachElements(missile3[localPlayer], RustlerNW[localPlayer], 1.3, 0.6, -0.8, 0, 0, 270 ) attachElements(missile4[localPlayer], RustlerNW[localPlayer], 5.3, 0.6, -0.5, 0, 0, 270 ) attachElements(Barrel[localPlayer], RustlerNW[localPlayer], 0, 0, -1, 90, 0, 0) attachElements(AC1[localPlayer], RustlerNW[localPlayer], -0.3, 2.6, -0.2, 0, 0, 180 ) attachElements(AC2[localPlayer], RustlerNW[localPlayer], 0.3, 2.565, -0.2, 0, 0, 0 ) attachElements(Satelite[localPlayer], RustlerNW[localPlayer], 0.3, -4.3, 1.75, 0, 0, 90 ) BarrelC = Barrel[localPlayer] RustlerC = RustlerNW[localPlayer] Player = localPlayer end ) addEvent("dropBomb",true) addEventHandler("dropBomb",root, function() if BarrelC then detachElements(BarrelC, RustlerC) triggerClientEvent("bombExplode", root, BarrelC) end end ) addEvent("goBoom",true) addEventHandler("goBoom", root, function(barrel, bx, by, bz, localPlayer) if barrel then createExplosion( bx, by, bz, 2, localPlayer) destroyElement(barrel) end end )
  12. So, i don't know if you guys have ever heard about "Power Cut" mod on GTA IV. I've been searching for a long time a mod liek this for SA. So my question is, how to turn off all lighting? I mean including map lights and stuff so it looks like in a map editor. (No special light or stuff) I still can't find the file where to make this possible. What i mean is the light in buldings and stuff c: So, could you guys help me please? =)
  13. True, but... Hey let's be realistic with this part. You can also encounter massive FPS drop if you mess enough with the "setRainLevel" function.
  14. There are some functiosn related to timecyc.dat, like -- Sky Gradient Functions getSkyGradient setSkyGradient -- Sun Functions setSunSize getSunSize resetSunSize setSunColor getSunColor resetSunColor -- Far Clip Functions setFarClipDistance getFarClipDistance resetFarClipDistance -- Fog Functions setFogDistance getFogDistance resetFogDistance So, why not add more functions? We already messed with some part of timecyc.dat, so why not the rest? Such as -- Light Functions setAmbientLightColor( string type, int r, int b, int b) Types: "Static Objects" -- Objects without movement "Dynamic Objects" -- Moveable objects "Direct Light" -- Light reflected to buildings, vehicles and peds ( i think ) "Light on ground" -- nuff' said. int, int, int = getDynamicAmbientLightColor() resetAmbientLightColor( bool true/false ) setAmbientLightEnabled( bool true/false ) --Shadow functions setShadowIntensity( int intensity ) int = getShadowIntensity() resetShadowIntensity( bool true/false ) setShadowsEnabled( bool true/false ) -- Cloud functions setCloudColor( int r, int b, int b ) int, int, int = getCloudColor() resetCloudColor( bool true/false ) -- Sun Functions setSunBrightnessLevel( int level ) int = getSunBrightnessLevel() resetSunBrightnessLevel( bool true/false ) Maybe there could be more... and i'm sure this can be done, but that's all i thought off. What do you guys think?
  15. Not only that... But MTA missed alot of other stuff... Like timed objects and their "turn on" time for example. These IPL or object functions should be extended.
  16. Well, if you haven't notice, on regular GTA SA, if you're under a ceiling or a roof, rain won't be able to get you. However on objects created by MTA (That do have ceilings aswell) gets rain even inside of the object (Case of hangars), so it wouldn't be bad to add a "No-Rain" object option. I'm pretty sure this can be implemented. What do you guys think?
  17. Hi guys, it's me ELMO... No... WolfPire x'D I got a lil' problem with this script i'm about to call "bad mother f*cker". The problem is that, everything is fine, but when i shoot my missiles by pressing "C". The missiles don't get rotation and besides. When i turn 180° degrees with my plane, it just becomes almost 1 missiles (it's actually the 4 missiles in 1 place) i found this really weird, if you still don't get this just tell me. Client bindKey("c", "down", function() if not MT then MT = setTimer(fire, 1000, 1) end end ) function fire() v = getPedOccupiedVehicle( localPlayer ) x, y, z = getElementPosition( v ) rx, ry, rz = getElementRotation( v ) velX, velY, velZ = getElementVelocity ( v ) if getElementModel( v ) == 476 then m1 = createProjectile( localPlayer, 19, x + 8, y + 3, z-2, 3.0, nil, rx, ry, rz, velX*3.0, velY*3.0, velZ*3.0, 3790) m2 = createProjectile( localPlayer, 19, x + 4, y + 3, z - 2.5, 3.0, nil, rx, ry, rz, velX*3.0, velY*3.0, velZ*3.0, 3790) m3 = createProjectile( localPlayer, 19, x + -4, y + 3, z - 2.5, 3.0, nil, rx, ry, rz, velX*3.0, velY*3.0, velZ*3.0, 3790) m4 = createProjectile( localPlayer, 19, x + -8, y + 3, z - 2.5, 3.0, nil, rx, ry, rz, velX*3.0, velY*3.0, velZ*3.0, 3790) MT = nil end end Thanks in advance c:
  18. Thanks, suggestion accepted.
  19. I need to, to get all the bodyparts, my problem is the getPlayerEXP. Which doesn't seem to pass. I'm implying that if the player has "0" exp points, the killer will just be given money and the killed player wont loose any exp points. Maybe i'm kinda blind or confused, correct my point if i'm wrong. EDIT: Can someone please put me an epic facepalm please?
  20. Not really messy. "elseif" to get each bodypart and give determined money depending where the player was killed.
  21. So... there's a problem here, seems like it won't pass the "elseif" s no matter what i do... Kill Rewards (Server) function getWhere( ammo, killer, weapon, bodyPartID ) if (bodyPartID == 9 and exports.exp:getPlayerEXP(source) > 0) then givePlayerMoney(killer, 500) exports.exp:addPlayerEXP(killer,10) exports.exp:addPlayerEXP(source, -10) outputChatBox ( "You've earned 10 exp points!" , killer, 0, 255, 0 ) outputChatBox ( "You've lost 10 exp points!" , source, 255, 0, 0 ) else givePlayerMoney(killer, 500) elseif (bodyPartID == 9 and exports.exp:getPlayerEXP(source) > 0) then givePlayerMoney(killer, 500) exports.exp:addPlayerEXP(killer,10) exports.exp:addPlayerEXP(source, -10) outputChatBox ( "You've earned 10 exp points!" , killer, 0, 255, 0 ) outputChatBox ( "You've lost 10 exp points!" , source, 255, 0, 0 ) else givePlayerMoney(killer, 500) elseif (bodyPartID == 9 and exports.exp:getPlayerEXP(source) > 0) then givePlayerMoney(killer, 300) exports.exp:addPlayerEXP(killer,5) exports.exp:addPlayerEXP(source, -5) outputChatBox ( "You've earned 5 exp points!" , killer, 0, 255, 0 ) outputChatBox ( "You've lost 5 exp points!" , source, 255, 0, 0 ) else givePlayerMoney(killer, 300) elseif (bodyPartID == 9 and exports.exp:getPlayerEXP(source) > 0) then givePlayerMoney(killer, 300) exports.exp:addPlayerEXP(killer,5) exports.exp:addPlayerEXP(source, -5) outputChatBox ( "You've earned 5 exp points!" , killer, 0, 255, 0 ) outputChatBox ( "You've lost 5 exp points!" , source, 255, 0, 0 ) elseif (bodyPartID == 9 and exports.exp:getPlayerEXP(source) > 0) then givePlayerMoney(killer, 300) exports.exp:addPlayerEXP(killer,5) exports.exp:addPlayerEXP(source, -5) outputChatBox ( "You've earned 5 exp points!" , killer, 0, 255, 0 ) outputChatBox ( "You've lost 5 exp points!" , source, 255, 0, 0 ) else givePlayerMoney(killer, 300) elseif (bodyPartID == 9 and exports.exp:getPlayerEXP(source) > 0) then givePlayerMoney(killer, 300) exports.exp:addPlayerEXP(killer,5) exports.exp:addPlayerEXP(source, -5) outputChatBox ( "You've earned 5 exp points!" , killer, 0, 255, 0 ) outputChatBox ( "You've lost 5 exp points!" , source, 255, 0, 0 ) else givePlayerMoney(killer, 300) elseif (bodyPartID == 9 and exports.exp:getPlayerEXP(source) > 0) then givePlayerMoney(killer, 1000) exports.exp:addPlayerEXP(killer,50) exports.exp:addPlayerEXP(source, -50) outputChatBox ( "You've earned 50 exp points!" , killer, 0, 255, 0 ) outputChatBox ( "You've lost 50 exp points!" , source, 255, 0, 0 ) else givePlayerMoney(killer, 1000) end end addEventHandler ( "onPlayerWasted", root, getWhere ) _________ I want them to do this:
  22. I shall kiss you, ok no lol. Thanks again, solid =)
  23. 1. Done 2. Done 3. How? A. Need the code? EDIT: ERROR: freeroam/fr_client.lua:794: attempt to concatenate local "sinceminutes" (a boolean value) Fr Server addEvent("DataS",true) addEventHandler("DataS",root, function() pAccount = getPlayerAccount ( source ) sincehours = getAccountData( pAccount, "player.memberho" ) sinceminutes = getAccountData( pAccount, "player.membermi" ) sinceday = getAccountData( pAccount, "player.memberda" ) sincemonth = getAccountData( pAccount, "player.membermo" ) sinceyear = getAccountData( pAccount, "player.memberye" ) exppoints = exports.exp:getPlayerEXP( source ) triggerClientEvent( source, "DataC", source, sincehours, sinceminutes, sinceday, sincemonth, sinceyear, exppoints) end ) Fr Client --------------------------- -- Profile --------------------------- ProfileW = guiCreateWindow(497,155,345,471,"",false) ProfileN = guiCreateLabel(16,114,300,16,"Name:",false,ProfileW) ProfileMS = guiCreateLabel(16,139,300,16,"Member Since: ",false,ProfileW) Line1 = guiCreateLabel(14,162,317,18,"_____________________________________________",false,ProfileW) guiLabelSetColor(Line1,0,255,0) ProfileK = guiCreateLabel(16,190,300,16,"Kills:",false,ProfileW) ProfileHS = guiCreateLabel(38,215,300,16,"Headshots: ",false,ProfileW) ProfileD = guiCreateLabel(16,239,300,16,"Deaths: ",false,ProfileW) ProfileT = guiCreateLabel(16,294,300,16,"Team: ",false,ProfileW) Line2 = guiCreateLabel(14,264,317,18,"_____________________________________________",false,ProfileW) guiLabelSetColor(Line2,0,255,0) Exp = guiCreateLabel(16,322,300,16,"Experience: ",false,ProfileW) ButtonPX = guiCreateButton(273,435,63,26,"X",false,ProfileW) guiWindowSetSizable(ProfileW,false) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(ProfileW,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(ProfileW,x,y,false) guiSetVisible(ProfileW, false) function nProfile() if guiGetVisible(ProfileW) == true then guiSetVisible(ProfileW, false) removeEventHandler("onClientGUIClick", ButtonPX, closeManualP) else guiSetVisible(ProfileW, true) setTimer(Data,1000,1) addEventHandler("onClientGUIClick", ButtonPX, closeManualP) end end function closeManualP() guiSetVisible(ProfileW, false) removeEventHandler("onClientRender", root, Data) end function Data() triggerServerEvent("DataS", root) end addEvent("DataC",true) addEventHandler("DataC", root, function( sincehours, sinceminutes, sinceday, sincemonth, sinceyear, exppoints ) guiSetText(ProfileMS, "Member Since: " .. sinceday .. " / " .. sincemonth .. " / " .. sinceyear .. " | " .. sincehours .. ":" .. sinceminutes .. "" ) guiSetText(Exp, "Experience: " .. exppoints) end ) Login System (server) addEvent("register",true) addEventHandler("register",getRootElement(), function(thePlayer, NameR, PassR, Confirm) if not (NameR == "") then if not (PassR == "") then if not (Confirm == "") then if PassR == Confirm then local account = getAccount (NameR,PassR) if (account == false) then local accountAdded = addAccount(tostring">tostring(NameR),tostring">tostring(PassR)) if (accountAdded) then outputChatBox ("You've successfully registred! [Name: " .. NameR .. "| Password: " .. PassR .. "]",thePlayer,0,255,0,true ) local time = getRealTime() sincehours = time.hour sinceminutes = time.minute sinceday = time.monthday sincemonth = time.month sinceyear = time.year setAccountData( getPlayerAccount ( thePlayer ), "player.memberho", sincehours) setAccountData( getPlayerAccount ( thePlayer ), "player.membermi", sinceminutes) setAccountData( getPlayerAccount ( thePlayer ), "player.memberda", sinceday) setAccountData( getPlayerAccount ( thePlayer ), "player.membermo", sincemonth) setAccountData( getPlayerAccount ( thePlayer ), "player.memberye", sinceyear) setTimer(outputChatBox,800,1,"Try to login now! Remember this information to login!",thePlayer,0,255,0,true ) else outputChatBox ("ERROR: Please use another Name/Password.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: A player with that name already exist.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: The passwords don't match.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: Please confirm your password.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: Please put a password.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: Please put a name.",thePlayer,255,0,0,true) end end )
  24. addEvent("register",true) addEventHandler("register",getRootElement(), function(thePlayer, NameR, PassR, Confirm) if not (NameR == "") then if not (PassR == "") then if not (Confirm == "") then if PassR == Confirm then local account = getAccount (NameR,PassR) if (account == false) then local accountAdded = addAccount(tostring">tostring">tostring">tostring">tostring">tostring(NameR),tostring">tostring">tostring">tostring(PassR)) if (accountAdded) then outputChatBox ("You've successfully registred! [Name: " .. NameR .. "| Password: " .. PassR .. "]",thePlayer,0,255,0,true ) local time = getRealTime() hours = time.hour minutes = time.minute day = time.monthday month = time.month year = time.year sincehours = hours sinceminutes = minutes sinceday = day sincemonth = month sinceyear = year setAccountData( getPlayerAccount ( thePlayer ), "player.member", sincehours) setAccountData( getPlayerAccount ( thePlayer ), "player.member", sinceminutes) setAccountData( getPlayerAccount ( thePlayer ), "player.member", sinceday) setAccountData( getPlayerAccount ( thePlayer ), "player.member", sincemonth) setAccountData( getPlayerAccount ( thePlayer ), "player.member", sinceyear) setTimer(outputChatBox,800,1,"Try to login now! Remember this information to login!",thePlayer,0,255,0,true ) else outputChatBox ("ERROR: Please use another Name/Password.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: A player with that name already exist.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: The passwords don't match.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: Please confirm your password.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: Please put a password.",thePlayer,255,0,0,true) end else outputChatBox ("ERROR: Please put a name.",thePlayer,255,0,0,true) end end ) Defined in the login system (server) stored data. so i don't see where's the error tho.
×
×
  • Create New...