Author Topic: Script Release Thread.  (Read 1323 times)

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: Script Release Thread.
« on: November 29, 2012, 01:08:00 pm »
[Include]L-Reputation System

Description
Well, this is a reputation system and is a plug-n-play script. It has custom functions and a callbacks. More natives will be added in next update. This script is released under SAMP by me, so I'm feeling free to paste the download link too.

Functions
SetPlayerReputations(playerid, amount);ResetPlayerReputations(playerid);ResetPlayerReputationsEx(playerid, reason[]);GivePlayerReputations(playerid, amount);GivePlayerReputationsEx(playerid, amount, color, comment[]);GetPlayerReputations(playerid);?>


CallBack
public OnPlayerRepChange(playerid, oldreps, newreps)?>


This script also provides an update to player while connecting which means it resets the reps, so you don't need to do it again. If a saving system is used, it won't collide against the resetting reps while connect. It just loads the save data after it.

To use it, just download the file, add it on Pawno>include and include it under a_samp
#include <a_samp>#include <lreps>?>

Done!

Example:
public OnPlayerDeath(playerid, killerid, reason){ if(GetPlayerKills(killerid) >= 5) {   GivePlayerReputations(killerid, 1);   SendClientMessage(killerid, -1, "You have earned a reputation point along killing spree!"); } return 1;}?>

The above example shows that it gives a rep point to the killer while he kills 5 players, just like killing spree.

Link:http://pastebin.com/NvKCubrL

« Last Edit: November 29, 2012, 01:10:03 pm by Lordz »