|
|
Re: Creating BRenBot plugins [message #318876 is a reply to message #318870] |
Mon, 25 February 2008 08:22 |
|
Omar007
Messages: 1711 Registered: December 2007 Location: Amsterdam
Karma: 0
|
General (1 Star) |
|
|
Neh my problem is that i don't know what i must add into the AllGuns.pm file.
I don't know the signatures of all weapons in BRenBot.
I studied the one of !destroyveh and it comes out with yhis code:
-------------------------------------------------------------
sub destroyveh
{
my ( $kernel, $session, $heap, $args ) = @_[ KERNEL, SESSION, HEAP, ARG0 ];
my %args = %{$args};
if ( $args{arg} =~ m/^\!\S+\s(.+)$/i )
{
my ( $result, %player ) = plugin::getPlayerData ( $1 );
if ( $result == 1 )
{
plugin::RenRemCMD ( "destroy_vehicle $player{id}" );
plugin::RenRemCMD("ppage $player{id} Your vehicle was destroyed by request.");
}
else { doMsg("Error: $args{arg1} was not found ingame, or is not unique",$args{nicktype}, "A"); }
}
else
{
doMsg("Syntax: !destroyveh <player>",$args{nicktype}, "A");
}
}
-----------------------------------------------------
I don't know what i have to fill in by the --> if ( $args{arg} =~ m/^\!\S+\s(.+)$/i ) <-- for all weapons. This should be a check for the vehicle but now i want the code for the weapons.
So my problem really lies in the 'programming' part.
PS. That's not a miracle i'm just 15
|
|
|
|
|
|
|