25.02.2013, 09:58
kR@Nk
Hello Guys This is my first attempt to scripting in Pawno and i have made my first filterscript which is a simple ranking system.This system is best for TDM servers.
Features
12 Ranks.
on each rank you will update your stars Textdraw
new Status Textdraw
/myrank to see your Rank
on each rank you will update your stars Textdraw
new Status Textdraw
/myrank to see your Rank
CODE
NOTE:I Dont Care About Credits BUT Always mention my Name XD
Код:
/* Killer's system... Features: 12 s. on each you will update your stars Textdraw new Status Textdraw /my to see your WARNING: Do not remove Credits.. */ #include <a_samp> #include <zcmd> #define DIALOG 1000 public OnFilterScriptInit() { print("\n--------------------------------------"); print("kIlL3R System L0AD3D"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG) { if(response) { new string[256]; format(string, sizeof(string),"%s",GetPlayer(playerid)); SendClientMessage(playerid, 0x00FFFFFF, string); } } return 1; } CMD:(playerid, params[]) { new string[256]; format(string, sizeof(string),"%s",GetPlayer(playerid)); SendClientMessage(playerid, 0x00FFFFFF, string); return 1; } CMD:s(playerid, params[]) { ShowPlayerDialog(playerid, DIALOGRANK, DIALOG_STYLE_MSGBOX,"{00FFFF}Ranks","Rank 0 (Trainee) (Scores:0)\nRank 1 (Private)(Scores:50)\nRank 2 (Corporal)(Scores:100)\nRank 3 (Sergeant)(Scores:300)\nRank 4 (Leutinent)(Scores:600)\n Rank 5 (Officer)(Scores:800)\n Rank 6 (Captain)(Scores:2000)\nRank 7 (Colonel)(Scores:4000)\nRank 8 (Majour)(Scores:7000)\nRank 9 (Majour General)(Scores:9000)\nRank 10 (General)(Scores: 12000)\nRank 11 (General OF the Army)(Scores: 15000)\nRank 12 (Master Of War)(Scores: 20000)","My Rank","Close"); return 1; } stock GetPlayerRank(playerid) { new str[256]; if(GetPlayerScore(playerid) >= 0) str = ("Rank 0 (Trainee"); if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) <= 99) str = ("Rank 1 (Private)"); if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 299) str = ("Rank 2 (Corporal)"); if(GetPlayerScore(playerid) >= 300 && GetPlayerScore(playerid) <= 599) str = ("Rank 3 (Sergeant)"); if(GetPlayerScore(playerid) >= 600 && GetPlayerScore(playerid) <= 799) str = ("Rank 4 (Leutinent)"); if(GetPlayerScore(playerid) >= 800 && GetPlayerScore(playerid) <= 1999) str = ("Rank 5 (Officer)"); if(GetPlayerScore(playerid) >= 2000 && GetPlayerScore(playerid) <= 3999) str = ("Rank 6 (Captain)"); if(GetPlayerScore(playerid) >= 4000 && GetPlayerScore(playerid) <= 5999) str = ("Rank 7 (Colonel)"); if(GetPlayerScore(playerid) >= 7000 && GetPlayerScore(playerid) <= 8999) str = ("Rank 8 (Majour)"); if(GetPlayerScore(playerid) >= 9000 && GetPlayerScore(playerid) <= 12999) str = ("Rank 9 (Majour General)"); if(GetPlayerScore(playerid) >= 12000 && GetPlayerScore(playerid) <= 14999) str = ("Rank 10 (General)"); if(GetPlayerScore(playerid) >= 15000 && GetPlayerScore(playerid) <= 19999) str = ("Rank 11 (General OF the Army)"); if(GetPlayerScore(playerid) >= 20000) str = ("Rank 12 (Master Of War)"); return 1; }