AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   All frags 0 (https://forums.alliedmods.net/showthread.php?t=102358)

Alucard^ 09-01-2009 10:59

All frags 0
 
Hi...

I have a new question, i want to put all frags 0... so if player kill someone he don't get a frag. Ofcourse that is very simple... BUT i want a FAKE 0 frag... So if i use get_user_frags(index) i can get the REAL frags of the player. Is this posible?

ot_207 09-01-2009 11:04

Re: All frags 0
 
Using ScoreInfo

Mxnn 09-01-2009 11:05

Re: All frags 0
 
You can do an if, if frags isn't 0 return frags to 0 and make a counter. (c+=1) something like this..

The real frags are the counter. Do you understand? But you have to do another if for the bombs frag and defused frags.
If user defused (c=c+3) if user plant and the bomb blows (c=c+3)
Its an idea.. I don't put the code because i don't know much pawn.. you can see in my posts :(

Alucard^ 09-01-2009 11:44

Re: All frags 0
 
@ot_2007

I know... but don't know how to do a FAKE 0 frag...

@Mxnn

Yes, this is the only idea that i have... will do a try to this..

ot_207 09-01-2009 11:51

Re: All frags 0
 
Quote:

Originally Posted by Alucard^ (Post 920011)
@ot_2007

I know... but don't know how to do a FAKE 0 frag...

There are 2 ways using what I have said.

You can register the message function and change its paramaters using this

Or you can hook the event and send the message again with 0 frags.

The first one is the best in my opinion

ConnorMcLeod 09-02-2009 00:58

Re: All frags 0
 
PHP Code:

#include <amxmodx>

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("0 frags"VERSION"ConnorMcLeod")

    
register_messageget_user_msgid("ScoreInfo"), "Message_ScoreInfo" )
}

/*Name:      ScoreInfo
Structure:     
byte     PlayerID
short     Frags
short     Deaths
short     ClassID?
short     TeamID 
*/
public Message_ScoreInfo(/*iMsgId, iMsgDest, iMsgEnt*/)
{
    
set_msg_arg_int(2ARG_SHORT0)



Alucard^ 09-02-2009 02:28

Re: All frags 0
 
Thx connor but i did it yesterday =X sry for not post that is solved, but i am waiting to finish the plugin and show here...

EDIT: a question...

PHP Code:

/*iMsgId, iMsgDest, iMsgEnt*/ 

In that case, i don't need to put this, right?

Exolent[jNr] 09-02-2009 08:44

Re: All frags 0
 
Quote:

Originally Posted by Alucard^ (Post 920578)
EDIT: a question...

PHP Code:

/*iMsgId, iMsgDest, iMsgEnt*/ 

In that case, i don't need to put this, right?

Well, comments add nothing to the functional code, so of course you don't have to have them.

Alucard^ 09-02-2009 14:40

Re: All frags 0
 
Yes, sry... stupid question =p

Thx.


All times are GMT -4. The time now is 15:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.