Raised This Month: $ Target: $400
 0% 

[Example] Changing player score


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
raydan
Senior Member
Join Date: Aug 2006
Old 12-20-2008 , 04:16   [Example] Changing player score
Reply With Quote #1

Here is the sample plugin to using "IncrementFragCount" to change player score. As we know, we can use "m_iFrags" or "m_iDeaths" to change score and death in game scoreboard, but you can't see updated data in server info.

In this example, you can add/set/reset scroe/death value in scorebaord and server info

PS: setting too high score/death value, scoreboard can't show correct value, but server info still display the real one.

Code:
RegConsoleCmd("add_score", add_5_score); // add 5 score
 RegConsoleCmd("add_death", add_5_death); // add 5 death
 
 RegConsoleCmd("reset_score", reset_score); //reset score to 0
 RegConsoleCmd("reset_death", reset_death); //reset death to 0
 
 RegConsoleCmd("set_score", set_score_to_4321); // set score to 4321
 RegConsoleCmd("set_death", set_death_to_4321); // set death to 4321
[IMG]http://img397.**************/img397/3369/omg12345scoreag2.jpg[/IMG]
Attached Files
File Type: txt weaponmodel.txt (1.4 KB, 390 views)
File Type: sp Get Plugin or Get Source (playerscore.sp - 1130 views - 2.6 KB)
raydan is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:40.


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