04.04.2013, 04:10
Info
* MySQL.
* Auto creates the `repinfo` table. With the proper columns (which are; username and reps)
* Auto creates the players accounts on player connect (Once a player connects it adds a new row onto the table repinfo with the players username and 0 rep)
* Reputation Points are based on score (i.e You can reputate 1 point when your score is less than 50 and 2 points if it's more than or equal to 50 but less than 120 based on the default).
* 30 Minutes waiting time before you're able to reputate again.
* MySQL.
* Auto creates the `repinfo` table. With the proper columns (which are; username and reps)
* Auto creates the players accounts on player connect (Once a player connects it adds a new row onto the table repinfo with the players username and 0 rep)
* Reputation Points are based on score (i.e You can reputate 1 point when your score is less than 50 and 2 points if it's more than or equal to 50 but less than 120 based on the default).
* 30 Minutes waiting time before you're able to reputate again.
pawn Код:
//Your MySQL Setup
#define host "localhost"
#define user "root"
#define db "testpurpose"
#define password ""
// Time to wait before a player can rep again. (In Milliseconds, default is set to 30 mins)
#define TimetoWait 1800000
#define First.RequiredScore 50 // When a player has less than 50 score and does /rep other players, he's gonna give them,
#define FirstRepPoints 1 // 1 Reputation Point
#define Second.RequiredScore 120 // When a players score is < 120 but >= 50 and does /rep other players, he's gonna give them,
#define SecondRepPoints 2 // 2 Reputation Point
#define Third.RequiredScore 200
#define ThirdRepPoints 3 // You get the point here
#define Fourth.RequiredScore 330
#define FourthRepPoints 4 // Change all values of the defines to your preference
#define Fifth.RequiredScore 400
#define FifthRepPoints 5
Set to true if you want to view user's reputation via OnPlayerClickPlayer else set it to false.
pawn Код:
new bool:USEonPlayerClickPlayer = true;
SCREENSHOTS
Had to test it myself. So what you see in the screenshot is me reputating myself solely for testing purposes.
Commands
/rep [playerid]
/checkrep [playerid]
/myrep
CREDITS
* to BlueG's MySQL Plugin
* to ******'s Sscanf Plugin
* to Zeex for the ZCMD Command Processor
* to Neil for the scripting
Link
Solidfiles | Pastebin | Mediafire | 4Shared | DepositFiles
All but Pastebin includes the proper MySQL, Sscanf, Zcmd plugins and includes.