Main Menu

Recent posts

#81
Scripting Help / client.player.position
Last post by tucson913 - December 21, 2024, 11:05:50 AM
Hi all!

I have problem with the player position.

I wrote a simple vehicle spawn command and I get this error message:
QuoteTypeError: client.player is null

The client.player exists only on client side? Or how can I get the player position?
Thank you!

Code:
addEventHandler('OnPlayerCommand', (event, client, command, parameters) => {

    console.log(`(Command) ${client.name} has used the command '/${command} ${parameters}'.`);
   
      switch(command){
        case "v":
            case "veh":
                case "vehicle":
                    var veh = gta.createVehicle(parseInt(parameters), client.player.position);
                    addToWorld(veh);
                    client.player.warpIntoVehicle(veh, 0);
        break;

        default:
            message("UNK CMD");
        break;
      }
});

#82
Suggestions / Re: New scripting language. Pa...
Last post by jack1989 - December 17, 2024, 04:33:36 PM
"The new scripting language related to Pawno sounds like an exciting development! It could open up more opportunities for customization, efficiency, and creativity in game development. For those familiar with Pawno, this could streamline scripting and offer advanced features for server management. Website Exploring its potential could lead to some incredible projects!"






#83
Advertisements / Connected Roleplay
Last post by Vortrex - December 07, 2024, 05:45:40 PM

Connected Roleplay
The official roleplay server of GTA Connected!

Discords
GTA III  •  GTA Vice City  •  GTA IV  •  Mafia 1

Connect
Click one of the games below to connect to the server!
GTA III   •   GTA Vice City   •   GTA IV   •   Mafia 1

Connect
  • Public jobs
  • Clans with custom ranks, permissions, pay, titles, and more
  • Custom inventory system where everything is an item. Food, weapons, devices, etc
  • All items can be dropped, given, used, picked up, or stored in certain places
  • Ownable vehicles/houses/businesses, and more
  • Stock your business with any items you want, and set custom prices
  • No hard cap to how many things you can own
  • Security features like 2FA, email alerts for login attempts, and more
  • Animations for extra RP goodness
  • Community-provided translations for GUI and server messages
  • Double paychecks on weekends!
  • Too many other things to list here
  • Also available on Mafia Connected
Connect
Add the servers to your favorite list for easy connecting!
#84
Scripting Releases / Re: [JS] Gamemode for fun time...
Last post by Vortrex - November 29, 2024, 01:50:15 PM
Quote from: Toejam on November 04, 2024, 04:12:22 PMTell me, does GTA Connect support the drive-by option? When a passenger, while in a car, can shoot from it, like gangs?
Not with scripting, no.
#85
Scripting Help / Re: Pay 'n' Spray and Shops fo...
Last post by Vortrex - November 29, 2024, 01:46:50 PM
Enable singleplayer features and scripts using the following in server.xml:
<cvar name="singleplayer" value="1" />
<cvar name="scripts" value="1" />
#86
Scripting Help / Re: skin changer
Last post by Vortrex - November 29, 2024, 01:45:13 PM
Quote from: volvofan on June 24, 2024, 10:30:47 PMYour script does not work for me in GTA 3. I just get: TypeError: localPlayer is null for the line localPlayer.skin = skinId;.
It seems like there isn't any script yet for skin-changing here: https://github.com/VortrexFTW/v-essentials
Maybe in the future?

Yes, I'll make one.
#87
Scripting Help / Re: problem function
Last post by Vortrex - November 29, 2024, 01:44:29 PM
Strange. The function does exist.
#88
Suggestions / Re: New scripting language. Pa...
Last post by Vortrex - November 29, 2024, 01:39:40 PM
New scripting languages are possible, but our efforts are focused on other features and fixes right now. We'll take it into consideration.

As for textdraws, you can use a GUI library like MexUI or the HTML stuff to script a SAMP-like GUI system.
#89
Suggestions / New scripting language. Pawno
Last post by olegshteker - November 06, 2024, 08:06:41 AM
Hello everyone. I would like to see the Pawno language in GTA Connected for all 4 games, III, VC, SA and IV. This will be very convenient for migrating servers from other multiplayers, whose server mod is written in this scripting language, in particular from SA-MP 0.3.7, VC-MP 0.3z R2 and VMP (Vice Multi-Player).

Also for Pawno I would like to see Textdraws, dialogues from SA-MP for all 4 games, and the rest of your functionality.

Thank you for your attention, I will wait for an answer. Oleg_Shteker.
#90
Scripting Releases / Re: [JS] Gamemode for fun time...
Last post by Toejam - November 04, 2024, 04:12:22 PM
Hello! I am immensely grateful to you and the author of GTA Connected for the opportunity to play with a friend in "single mode" online! You wrote on GitHub that you are not going to support the script. I would like to continue its development. I have a small team with a programmer and a tester. At the moment, we are studying the GTA Connected wiki and some difficulties are arising.

Tell me, does GTA Connect support the drive-by option? When a passenger, while in a car, can shoot from it, like gangs?

I have a example from MTA

P.S. I use google translator, I'm from Russia
function setDoingDriveby ( )
        -- we check if local player isn't currently doing a gang driveby
        if not isPedDoingGangDriveby ( localPlayer ) then
                -- if he got driveby mode off, turn it on
                setPedWeaponSlot ( localPlayer, 4 )
                setPedDoingGangDriveby ( localPlayer, true )
        else
                -- otherwise, turn it off
                setPedWeaponSlot ( localPlayer, 0 )
                setPedDoingGangDriveby ( localPlayer, false )
        end
end
addCommandHandler ( "driveby", setDoingDriveby )