Jump to content

Recommended Posts

Posted

Hey Guys,
i have an issue with this function... (https://wiki.rage.mp/index.php?title=Player::call)

Code:

//Server-Side Script: player.call Test
mp.events.add("playerEnterVehicle", (player, vehicle, seat) => {
	player.call("sendVehicle", [true, vehicle]);
	console.log('playerEnterVehicle: sendVehicle => ServerSide');//i see this debug in the console ๐Ÿ‘
});

//Client-Side Script: player.call Test
mp.events.add("sendVehicle", (active, vehicle) => {
	if (active) {
		if(vehicle){
			console.log('playerEnterVehicle: sendVehicle => ClientSide');// i dont get any information ๐Ÿ‘Ž
		}
	}
});

i see the ServerSide console debug, but not the ClientSide, why?
Can someone help me please?

greetings

Posted

you don't have console.log in clientside. you would have to code your own log function. try a mp.game.graphics.notify("worked") instead

  • Like 1
Posted
vor 6 Minuten schrieb Flow:

you don't have console.log in clientside. you would have to code your own log function. try a mp.game.graphics.notify("worked")๏ปฟ๏ปฟ instead๏ปฟ๏ปฟ

holy shite is that dump, thanks it worked ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ‘Œ

Posted

You can also use javascript alert function to debug stuff on client-side, it will pop-up just like a notification over the player screen.

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