$$QUERY Objects o:Player's [i:PlayerNum] Buddy Bot object qGetBuddyObj GetBuddyObj Gets a player's buddy bot object based on a player number Parameters: PlayerNum: the player to get the buddy bot from $$END */
| 534 | $$END |
| 535 | */ |
| 536 | int qGetBuddyObj(int playernum) { |
| 537 | msafe_struct mstruct; |
| 538 | mstruct.slot = playernum; |
| 539 | MSafe_GetValue(MSAFE_OBJECT_PLAYER_HANDLE, &mstruct); |
| 540 | |
| 541 | int buddy_handle; |
| 542 | Player_Value(mstruct.objhandle, VF_GET, PLYV_I_BUDDY_HANDLE, &buddy_handle); |
| 543 | |
| 544 | return buddy_handle; |
| 545 | } |
| 546 | |
| 547 | /* |
| 548 | $$QUERY |
no test coverage detected