0% found this document useful (0 votes)
11 views1 page

Anti Spam

The document outlines a function that handles player device information events in a gaming context. It checks for specific event names, retrieves the device model, logs it, and updates the player's data with this information. This process facilitates the management of player data based on device information.

Uploaded by

millardkareem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Anti Spam

The document outlines a function that handles player device information events in a gaming context. It checks for specific event names, retrieves the device model, logs it, and updates the player's data with this information. This process facilitates the management of player data based on device information.

Uploaded by

millardkareem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

// note: this deletes after spam, it isn't actual anti

handlers.Player_device_info = function (args, context) {


var event = context.playStreamEvent;

// Check if the event is player_device_info event


if (event.EventName === "player_device_info" || event.EventName ===
"player_action_executed") {
// Access the DeviceModel
var deviceModel = event.DeviceInfo.DeviceModel;

// Now you can use the deviceModel as needed


// For example, you can store it in player data, perform some logic, etc.
log.info("Device Model of the player: " + deviceModel);

// You can also update player data with this information


var updateDataRequest = {
PlayFabId: currentPlayerId,
Data: {
"DeviceModel": deviceModel
}
};

// Update player data


server.UpdateUserData(updateDataRequest);
}
}

You might also like