Sign in to follow this  
Mentanding

player.call issue

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 😂😂😂👌

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.