Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Other Products » Brenbot Plugin
Re: Brenbot Plugin [message #401358 is a reply to message #400153] Thu, 03 September 2009 01:16 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
You don't need to manually send RenRemCmd("player_info"), BRenBot already did that on the player_joined line, the reason for the timer is because you have to wait for the response to come back.

You also need to pass the name to the timer so you know which player it triggered for, ie;

	$_[KERNEL]->alarm( end=> (int(time()) +3) => $player->{'name'} );





In the end sub you need to use something like

end => sub 
{
  my ( $result, %player ) = plugin::getPlayerData ( $_[ARG0] );
  if ( $result != 1 )
  {
    brIRC::ircmsg( "7 Player 4 $player->{'name'} 4 $player->{'ip'}  7 Ping 4 $player->{'ping'} 7Serial 4 $player{'serial'} ", "A" );
  }
}




Also, you should never use playerdata::getPlayerData in your plugin, use plugin::getPlayerData instead, it calls the same function but because its in the plugin interface it will always be supported in future regardless of internal changes.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Thu, 03 September 2009 01:18]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Server crash when loaded C&C_Under.mix edit
Next Topic: Leveledit
Goto Forum:
  


Current Time: Wed Nov 27 12:50:13 MST 2024

Total time taken to generate the page: 0.01309 seconds