[FilterScript] Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc
#1

Some of you maybe thinking: Why did I release it?
- For the sake of the Community, love to share my work.
And moreover, I really have no use for this at the moment.
And eh, I didn't want to sell it either.

Dynamic Profile-card system
TEST VERSION
Images:


Video:
[ame="http://www.youtube.com/watch?v=GZaOlB7c-98"]http://www.youtube.com/watch?v=GZaOlB7c-98[/ame]

Commands: (In Profile.pwn - FilterScript):
  • /profile [Full name (for disconnected players)/Part of name (for connected players)]
  • /profileav - Change your avatar.
  • /profilebg - Change your background.
  • /profilec - Close any shown profile.
  • /myinfo - Change your "Personal Text"
Include Functions: (in Profile.inc - Include):
  • native Profile_SetTrusted(playerid, bool: set)
  • native Profile_SetFeatured(playerid, bool: set)
  • native Profile_SetPro(playerid, bool: set)
  • native Profile_GiveRep(playerid, value)
  • native Profile_GetRep(playerid)
  • native Profile_SetVip(playerid, bars, status[])
  • native Profile_SetAdminLevel(playerid, bars, status[])
  • native Profile_SetRegisterDate(playerid, date[])
  • native Profile_SetInfo(playerid, text[])
Script Example:
pawn Код:
#include <a_samp>
#include <ZCMD>
#include <sscanf2>
#include <profile>

new ADMIN_LEVELS[][] =
{
    "None", //<-- Level 0
    "Helper", //<-- Level 1
    "Moderator",
    "Server Moderator",
    "Administrator",
    "Owner" //<-- Level 5
};

enum pInfo //<-- If you use these weird & shitty names XD
{
    pAdminLevel,
    pScore,
    pMoney
    //bla bla..
}
new PlayerInfo[MAX_PLAYERS][pInfo];

CMD:setlevel(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] < 4)
    return SendClientMessage(playerid, -1, "ERROR: You need to be a level 4 admin");
   
    new targetid, level;
    if(sscanf(params, "ui", targetid, level))
    return SendClientMessage(playerid, -1, "USAGE: /setlevel [PlayerID] [Level]");
   
    if(!IsPlayerConnected(targetid))
    return SendClientMessage(playerid, -1, "ERROR: Player is not connected");
   
    if(level < 0 || level > 5)
    return SendClientMessage(playerid, -1, "ERROR: Enter a valid level (0 - 5)");
   
    Profile_SetAdminLevel(targetid, level, ADMIN_LEVELS[level]); //<--
    PlayerInfo[targetid][pAdminLevel] = level;
   
    new message[64], name[MAX_PLAYER_NAME];
   
    GetPlayerName(playerid, name, sizeof name);
    format(message, sizeof message, "%s has give you a new admin level: %i", name, level);
    SendClientMessage(targetid, -1, message);
   
    GetPlayerName(targetid, name, sizeof name);
    format(message, sizeof message, "You made %s level %i", name, level);
    SendClientMessage(playerid, -1, message);
    return true;
}
Scripting style:
  • Average. I don't have time to FIX & OPTIMIZE each and every thing!
    Yes, I used normal vars with no enums.
    Yes, I didn't use char arrays where I could.
    Yes, I have weird indentation, I was listening to dubstep.
    If you find problem with this style, create your own.
    Basically, I didn't stress on optimizing it.
Requirements:
  • A directory in your server: "/scriptfiles/Profiles" or the server will crash.
  • sscanf2+ by ****** - You need to download it seperately. Nevermind if you already have it.
  • ZCMD by Zeex - (Given with the download)
  • Double-O-Files 2 by Double-O-Seven - (Given with the download)
Legal:
License: Mozilla Public License

Apart from this, you have no right to release altered versions or claim as yours.
You need to keep the copyright details in the script or I *long beep*.

Download:
Mediafire - Click here.

Bugs:
There should be bugs, test and see if you find it. I didn't test it real hard.

Saving system(s):
DOF2 - Available
MySQL - Soon.
Y_INI - Soon.

Changelog:
Код:
* Initial Release, Test version. (29-Feb-12)
Credits:
- Zamaroht's Textdraw Editor.
- Zh3r0's Sprite Editor.
Reply


Messages In This Thread
Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by iPLEOMAX - 29.02.2012, 15:19
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Michael@Belgium - 29.02.2012, 15:21
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Guitar - 29.02.2012, 15:25
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Evansive - 29.02.2012, 15:28
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Lakiya - 29.02.2012, 15:33
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Ballu Miaa - 29.02.2012, 15:41
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by iPLEOMAX - 29.02.2012, 15:45
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Ballu Miaa - 29.02.2012, 15:54
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by iPLEOMAX - 29.02.2012, 16:03
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Ballu Miaa - 29.02.2012, 16:18
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by MadSkillz - 29.02.2012, 17:08
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by zgintasz - 29.02.2012, 18:07
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Littlehelper[MDZ] - 29.02.2012, 18:09
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Ballu Miaa - 01.03.2012, 03:12
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by FlawL3x - 01.03.2012, 09:35
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by ShOoBy - 01.03.2012, 10:00
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by DRIFT_HUNTER - 01.03.2012, 10:16
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by PowerMix - 01.03.2012, 11:35
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by xkirill - 01.03.2012, 12:10
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Rockstαr - 01.03.2012, 13:33
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by System64 - 01.03.2012, 13:57
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by urbaNRoots - 01.03.2012, 20:06
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Dripac - 01.03.2012, 22:09
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Dr.Evil_x - 02.03.2012, 06:13
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by Michael@Belgium - 02.03.2012, 16:49
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by iPLEOMAX - 02.03.2012, 16:57
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by inferno211 - 04.03.2012, 17:24
Re: Dynamic Profile-card system | Nice textdraw design | Offline user statistics etc - by BiGThAsE - 04.03.2012, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)