Advertisement
Hygcgggnngff

anti playfab spam

Sep 28th, 2024
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. handlers.Player_device_info = function (args, context) {
  2.     var event = context.playStreamEvent;
  3.  
  4.     // Check if the event is player_device_info event
  5.     if (event.EventName === "player_device_info" || event.EventName === "player_action_executed") {
  6.         // Access the DeviceModel
  7.         var deviceModel = event.DeviceInfo.DeviceModel;
  8.  
  9.         // Now you can use the deviceModel as needed
  10.         // For example, you can store it in player data, perform some logic, etc.
  11.         log.info("Device Model of the player: " + deviceModel);
  12.  
  13.         // You can also update player data with this information
  14.         var updateDataRequest = {
  15.             PlayFabId: currentPlayerId,
  16.             Data: {
  17.                 "DeviceModel": deviceModel
  18.             }
  19.         };
  20.  
  21.         // Update player data
  22.         server.UpdateUserData(updateDataRequest);
  23.     }
  24. }
Tags: anti spam
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement