Jump to content

Computer


Ballasbuster

Recommended Posts

Dude.. who you think i'am ? god? nah i'm not that fast just be patient and all will come, for now i've made start menu with a little animation hide/show there you can turn it off open e-mail and internet browser, i still need to get how i will make the websites system with a way that user can make it easy and not making lot of code either, i also thinking on make a kind of shut down system when click turnoff it will do something like the PC does.

Link to comment

i've created the first website, the only problem that its a bit weird how to build them :D.

works like this,

you create a new lua file with any name you wish then you add it to meta.xml as client side and there you create your gui stuff that has to be in scroll pane i have created, when you done with it you go to computer_client.lua and do same as i did with www.castillo.com (this is the test website) i also made a function that checks for element data of the label the you got the cursor over that checks for isLink and if its it will toggle in red else won't do anything.

for more information just go to the IP i posted before and check it out by yourself :)

time to sleep, bye!

Link to comment

You really suposed we was talking about real web sites ? :P:D

Edit: btw this is the code of castillo.com, may sound hard, also you gotta add some other stuff on client side of system :P

function createCastilloWeb() 
castillo = false 
castillo2 = false 
about_me = guiCreateLabel(0.0106,0.0118,0.2036,0.0619,"About me",true,Computer_scrollPane[1]) 
guiLabelSetColor(about_me,0,0,255) 
setElementData(about_me,"isLink",true) 
about_this_proyect = guiCreateLabel(0.1388,0.0177,0.2036,0.0619,"About this proyect",true,Computer_scrollPane[1])  
guiLabelSetColor(about_this_proyect,0,0,255) 
setElementData(about_this_proyect,"isLink",true) 
end 
  
function create_about_this_proyect() 
about_memo = guiCreateMemo(0.0015,0.118,0.9578,0.3186,"This resource has been created by Castillo to be available for anyone that needs it, i only ask not to remove my credits of the resource.",true,Computer_scrollPane[1]) 
guiMemoSetReadOnly(about_memo,true) 
about_label = guiCreateLabel(0.0322,0.7652,0.8097,0.2212,"Cheers Castillo!",true,Computer_scrollPane[1]) 
guiLabelSetColor(about_label,255,0,0) 
end 
  
function create_about_me() 
about_me_memo = guiCreateMemo(0.0015,0.118,0.9578,0.3186,"Well i'm a 15 years old male, a old mta player also and i won't tell you anything more :P",true,Computer_scrollPane[1]) 
guiMemoSetReadOnly(about_me_memo,true) 
end 
  
function destroyCastillo() 
castillo = false 
destroyElement(about_memo) 
destroyElement(about_label) 
end 
  
function destroyCastillo2() 
castillo2 = false 
destroyElement(about_me_memo) 
end 
  
addEventHandler("onClientGUIClick",getRootElement(), 
function () 
if (source == about_this_proyect) then 
if castillo == true then 
destroyCastillo() 
end 
if castillo2 == true then 
destroyCastillo2() 
end 
create_about_this_proyect() 
castillo = true 
elseif (source == about_me) then 
if castillo == true then 
destroyCastillo() 
end 
if castillo2 == true then 
destroyCastillo2() 
end 
create_about_me() 
castillo2 = true 
end 
end) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...