Jump to content

Best scripting idea ever?? !!??


Deepu

Recommended Posts

Posted

Hey guys, I am back again, like for a few months okay?.... I am now programming some games and now I thought of telling you one idea that came to my dreams yesterday morning..

in the gui functions

guiCreateWindow(x, y, lenth, breadth......)

there, instead of 2D x and y, why don't use 3D positions? :D

do you think its possible to create a 3D GUI?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

If you're doint a 3D thingy, why dont do it DX already? gui is only a quick lazy solution..

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

You know, you can just create your own function for that...

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

uhmmm.... I know quite a good list of maths bro, but uhmm, why don't u create a tangent and try to create 3D pts. with respect to that tangent touching a circle? I mean use DxDraw3dcircle( ) or something, and yeaah, can't we use C++? for MTA?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

Haha, you're always so defensive, Deepu. You already have all the functions you need to create a 3D-like DX menu, would it be easy? No. I simply said it's possible.

If you do know math as well as you claim, why don't you go ahead and do it yourself then? :P Yes, you can use C++, MTA's module system uses C++.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

WHAAAAAAAT !!!! Wow, C++ functions in MTA? can u gimmie the link?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

nvm....i don't like Lua because it doesnnt execute this loop..

for(i=0;health>=50;i++);

setElementHealth(woundedPlayer, i)

end

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

I think you're misunderstanding the concept of Modules. You can't just execute C++ in MTA like that. You need to create your own module, in C++, and compile it as a .dll file for it to be used with MTA.

I suggest you download the Module SDK and take a look at it, to get an idea how it works.

Edit:

No scripting language would run that loop. The ; at the end of for is not valid in any language. Also no logic would touch the script, even if there weren't syntax errors. Health as a variable has already been set, so whatever it's at isn't going to change during the loop, and nothing runs alongside for loops like this unless you have some multi-threaded module, which you don't, so unless you had a class set as health that returned an updated health whenever it was called, which you just don't, that's another failure on your part. Every language has an opening structure and closing structure, for LUA it's then/do and end respectively, for most others it's { and }. You have no "do", which is the correct method for opening a code segment after for, and basically the opposite of ";" which is used to end a code statement. Also you specify that the health increases but the loop only checks to see if a value is already at or over 50 before running, ie, it would run infinitely. Finally LUA doesn't allow the final argument in for to be any basic code, it's already an int/float that will be added every step of the for loop, so -

TL;DR: You did loads of things wrong with that, things that someone who knows any language would know not to do.

  
for (i=0;getElementHealth(woundedPlayer)<50;1) do 
setElementHealth(woundedPlayer, i); 
end 
  

Would check if the player has under 50 health, and if so increment 1 at a time until they were at 50.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted
I think you're misunderstanding the concept of Modules. You can't just execute C++ in MTA like that. You need to create your own module, in C++, and compile it as a .dll file for it to be used with MTA.

I suggest you download the Module SDK and take a look at it, to get an idea how it works.

Edit:

No scripting language would run that loop. The ; at the end of for is not valid in any language. Also no logic would touch the script, even if there weren't syntax errors. Health as a variable has already been set, so whatever it's at isn't going to change during the loop, and nothing runs alongside for loops like this unless you have some multi-threaded module, which you don't, so unless you had a class set as health that returned an updated health whenever it was called, which you just don't, that's another failure on your part. Every language has an opening structure and closing structure, for LUA it's then/do and end respectively, for most others it's { and }. You have no "do", which is the correct method for opening a code segment after for, and basically the opposite of ";" which is used to end a code statement. Also you specify that the health increases but the loop only checks to see if a value is already at or over 50 before running, ie, it would run infinitely. Finally LUA doesn't allow the final argument in for to be any basic code, it's already an int/float that will be added every step of the for loop, so -

TL;DR: You did loads of things wrong with that, things that someone who knows any language would know not to do.

  
for (i=0;getElementHealth(woundedPlayer)<50;1) do 
setElementHealth(woundedPlayer, i); 
end 
  

Would check if the player has under 50 health, and if so increment 1 at a time until they were at 50.

You're wasting your time explaining all this stuff to him. He's just acting smart which I think you already know.

/I'm out

Posted

sam1lter thank you for the reply, you are so smart, smarter than me, thats why can you tell me in which header file of Dos C++ the pixel line creation function is? without googling? then ok.. I accept that your smart, and please, I wasn't acting too smart...

@Dealman, thanks a lot.. so now I understand why the value wasn't getting incremented...

can't u make switch cases?

like

switch(health)

{case 1 : health >= 0;

break

.

.

.

.

.

}

can't we use that? or is it predefined for the keys? (not being smart :D)

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted
sam1lter thank you for the reply, you are so smart, smarter than me, thats why can you tell me in which header file of Dos C++ the pixel line creation function is? without googling? then ok.. I accept that your smart, and please, I wasn't acting too smart...

@Dealman, thanks a lot.. so now I understand why the value wasn't getting incremented...

can't u make switch cases?

like

switch(health)

{case 1 : health >= 0;

break

.

.

.

.

.

}

can't we use that? or is it predefined for the keys? (not being smart :D)

If you don't know something then just admit it. I don't script in C++. I know some basics only and I might learn more in future. While you already have MTA functions, what is the point of using C++? That's why I'm saying you're just acting smart.

Posted

Why are you guys having such pointless discussion over here? The languages you know nor your knowledge within these has nothing to do with one's intelligence.

Either way, using C++ actually gives you access to a larger library of functions, and also if I'm not wrong the execution time of those is slightly smaller. MTA's quite limited in this sense.

Posted

which means c++ is Better... So don't you think MTA shud make C++ lib?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

well, they can create header files for that? Can't they? ex:- mta.h? and it must have like 100-300 functions defined. Lua functions' origins were created the sameway, I saw the developed files...

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

You already have the ability to implement things into MTA using their Module system, it uses C++. Hell, you could probably implement Oculus Rift to MTA using their module system. :lol:

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

Lol, oculus rift + MTA will be fun :D

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

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...