PDA

View Full Version : Any questions welcome!


Toiletduck
03-30-2009, 01:11 PM
Any questions regarding scripting with Lua should be posted here.
Noob questions, complicated questions and anything else. I am sure that people will find this useful.

Please post your question here instead of starting a new thread as it can become irritating.

Kaufmancab51
03-31-2009, 03:56 PM
Hello I was trying to learn how to make bus commands [that is, calling for one, stopping the bus, and "changing the sign."]. How could someone do that?

Cachibache
03-31-2009, 08:13 PM
First Question How do we get coordenates, so we can use them to make spawn points and vehicle spawn points?

Example:createVehicle(227,372.919128,-505.898468,21.558399,144.049988,46,1)--


Second: how do we spawn "actors" (AI) in a server?

Third: is possible to meke the player set a team first, so the game will resoult in a Team deathmatch
or "GangWar"?

Ettans
04-01-2009, 12:27 AM
1. Saving vehicle/class coordinates: Type '/save <comment>' in-game, if you're onfoot, it'll output a
'createStaticActor' line, just change it around to fit your needs. If you're in a vehicle, it'll output a 'createVehicle' line.

2. Spawning actors: http://wiki.gtagaming.com/Static_Actor_Functions

3. Setting player to a team:

setPlayerTeam (http://wiki.gtagaming.com/Player_Functions/setPla yerTeam)
getPlayerTeam (http://wiki.gtagaming.com/Player_Functions/getPla yerTeam)

Toiletduck
04-01-2009, 11:14 AM
Actually, I have a question. Can you set player controls to 1 again?
I know that you can freeze someone but can you thaw them?
So far it has not worked for me.

Ettans
04-01-2009, 11:17 AM
Yes, you need to use 0/1 instead of false/true.

togglePlayerControllable(PlayerID,0)
togglePlayerControllable(PlayerID,1)

Toiletduck
04-01-2009, 01:33 PM
Thanks man. It didn't respond to boolean variables.

Ettans
04-01-2009, 11:42 PM
Yeah, although it should. I was struggling with it too until someone pointed it out. :)