|
|
#1 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jun 2007
Posts: 808
Reputation: 34
|
Rank/Level System What is it: With this include you can give players ranks. There are several ways a player can promote. You can let players have restrictions or permissions depending on their rank. Ok, so in what ways can a player promote? PromotionModes: Promotionmode 0 = Players can only promote with SetPlayerRank(playerid, rankID); Promotionmode 1 = Players will promote depending on their time (hours) spend online in the server Promotionmode 2 = Players will promote depending on their number of people they killed. Promotionmode 3 = Players will promote depending on their amount of cash (in dollars) Promotionmode 4 = Players will promote depending on their number of visits to your server Promotionmode 5 = Players will promote depending on their score How to instal: - Download Ranks.inc - Create in your 'scriptfiles'-folder a new folder called 'PlayerFiles' (Note the cApS!!) - Place on top of your gamemode: Code:
#include <Ranks> Code:
S_OnPlayerConnect(playerid); Code:
S_OnPlayerDisconnect(playerid); Code:
S_OnPlayerSpawn(playerid); Code:
S_OnPlayerDeath(killerid); Now you can configure some ranks: Put in your OnGameModeInit-callback the following line: Code:
SetPromotionMode(0-5); To add a new rank put in your OnGameModeInit-callback: Code:
AddRank(rankID, const Name[], Requirement, Startmoney, Float:SpawnHealth, Float:SpawnArmour, SpawnWeapon, SpawnAmmo);
Example: Code:
SetPromotionMode(2); AddRank(0, "Noob", 0, 5000, 25.0, 0, 0, 0); AddRank(1, "Newbie", 2, 7500, 50.0, 25.0, 24, 100); AddRank(2, "Professional", 10, 10000, 75.0, 50.0, 31, 500); AddRank(3, "Pwner", 20, 15000, 100.0, 100.0, 38, 2000); Other Functions:
You can do an IP-check to prevent people joining on someone elses name and f*uck up their stats. Risk of IP-check: If the IP of a 'fair' players has been changed, his/hers stats will not get saved anymore! To toggle this IP-check on/off use:
Commands you can use. (Put these in your gamemode): Code:
if(strcmp(cmd, "/rankinfo", true) == 0)
{
GetRankInfo(playerid);
return 1;
}
if(strcmp(cmd, "/mystats", true) == 0)
{
GetPlayerStats(playerid);
return 1;
}
Code:
if(strcmp(cmdtext, "/command", true)==0)
{
if(GetPlayerRank(playerid) == 3)
{
//rest of command
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Sorry, this command is only for players with rank 3");
}
return 1;
}
![]() ![]() ![]() Update History: [Version 1.0]:
[Version 2.0]:
Download: [Version 2.0]: - Ranks.inc (MediaFire) - Ranks.inc (SendSpace) - Ranks.inc (myfreefilehosting.com) [Version 1.0]: - Ranks.inc (MediaFire) You also need dini.inc, dutils.inc and dudb.inc If you don't have these includes, download this .rar file: (Credits to Dracoblue ofcourse )- DiniIncludes.rar (Mediafire) Notes: - This Include checks only once a minute if a player is ready for promotion! So if for example a player exeeds the required kills for promotion, he/she might promote 50 seconds later. - Only use SetPlayerRank when PromotionMode is set to '0'!!!! - If you're going to use this in your server, please give me credits. - If you find any bugs, please report them here. Have fun with it ![]() =>Sandra<= |
|
|
|
|
|
#2 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jan 2008
Location: Wales
Posts: 890
Reputation: 134
|
:O i thought it would never come true.... you made another inc which is brilliant!
nice job sandra, keep them coming ![]() DEFINETLY gonna use this
|
|
|
|
|
|
#3 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Nov 2007
Posts: 560
Reputation: 0
|
blewert, it's an include not a filterscript
|
|
|
|
|
|
#4 | |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jan 2008
Location: Wales
Posts: 890
Reputation: 134
|
Quote:
![]() PS:edited
|
|
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2007
Posts: 2,924
Reputation: 3
|
Can you only use 1 promotionmode like SetPromotion(1); or more?
Cuz i want like the visit thing as promotion and kills, that possible? |
|
|
|
|
|
#6 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jun 2007
Posts: 808
Reputation: 34
|
Thank you very much
![]() I also added an example how you can make commands for a specific rank only ![]() Example: Code:
if(strcmp(cmdtext, "/command", true)==0)
{
if(GetPlayerRank(playerid) == 3)
{
//rest of command
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Sorry, this command is only for players with rank 3");
}
return 1;
}
|
|
|
|
|
|
#7 | |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jan 2008
Location: Wales
Posts: 890
Reputation: 134
|
Quote:
|
|
|
|
|
|
|
#8 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jun 2007
Posts: 808
Reputation: 34
|
Lol, thanks :P
|
|
|
|
|
|
#9 |
|
Little Clucker
![]() Join Date: Feb 2008
Posts: 44
Reputation: 0
|
Im getting these errors
![]() Code:
E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2372) : warning 235: public function lacks forward declaration (symbol "S_OnPlayerConnect") E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2373) : error 021: symbol already defined: "S_OnPlayerConnect" E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2594) : warning 235: public function lacks forward declaration (symbol "S_OnPlayerDisconnect") E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2594) : error 025: function heading differs from prototype E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2595) : error 021: symbol already defined: "S_OnPlayerDisconnect" E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2746) : warning 235: public function lacks forward declaration (symbol "S_OnPlayerDeath") E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2746) : error 025: function heading differs from prototype E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(2747) : error 021: symbol already defined: "S_OnPlayerDeath" E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(3260) : warning 235: public function lacks forward declaration (symbol "S_OnPlayerSpawn") E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(3261) : error 021: symbol already defined: "S_OnPlayerSpawn" E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(6221) : error 047: array sizes do not match, or destination array is too small E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(6222) : error 047: array sizes do not match, or destination array is too small E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(6689) : error 017: undefined symbol "rankID" E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(6689) : error 029: invalid expression, assumed zero E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(6689) : error 017: undefined symbol "Name" E:\Games\San Andreas\GTA San Andreas\samp\gamemodes\penlv.pwn(6689) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase |
|
|
|
|
|
#10 |
|
Big Clucker
![]() ![]() Join Date: Aug 2007
Posts: 140
Reputation: 0
|
Nice Very Usefull , Thanks
Regards, Rasim |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rank(Level Systeam) | Stuff.lv | Help Archive | 0 | 29/03/2010 07:55 AM |
| Rank/Level System | hallo31 | Help Archive | 4 | 24/11/2009 02:23 PM |
| Rank (Level System) NOT ADMIN, BUT PLAYER | [AG]_Just | Help Archive | 7 | 02/10/2009 03:47 PM |
| Rank/level problem | flamethrower | Help Archive | 1 | 06/08/2009 12:30 AM |
| [FilterScript] [FS] Level System Version 1.7 by Oxside (2009) | Oxside | Filterscripts | 12 | 02/04/2009 06:03 PM |