[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
#2

omg ipleo .. you did it :O



respect++
Reply
#3

That's perfect. It's the best filterscript ever.
Reply
#4

Excellent realization.)
Reply
#5

Wow, One Word "Awesome" Dude
Keep it up
Reply
#6

BEST FS EVER!!!! Fucking Unique! You deserve 10k reputations.

By the way , how does this FS read's the players info from? I hope you get me.
Reply
#7

Thanks all.

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
BEST FS EVER!!!! Fucking Unique! You deserve 10k reputations.

By the way , how does this FS read's the players info from? I hope you get me.
Thanks , It uses INI file system for saving/loading.
Reply
#8

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
Thanks all.



Thanks , It uses INI file system for saving/loading.
EDIT: For newly registered player or a player who has not yet cutomised his profile. Is there a Default Profile for that also?
Reply
#9

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
EDIT: For newly registered player or a player who has not yet cutomised his profile. Is there a Default Profile for that also?
Yes, if the player uses "/profile" command, a card with random avatar & background is generated with all blank info.
If the player doesn't use any profile command and then leaves, the server won't save the profile.
Reply
#10

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
Yes, if the player uses "/profile" command, a card with random avatar & background is generated with all blank info.
If the player doesn't use any profile command and then leaves, the server won't save the profile.
Allright i just checked all that work's just fine.

Can you give me example's of Commands to make with the functions listed below!

native Profile_SetVip(playerid, bars, status[])
native Profile_SetAdminLevel(playerid, bars, status[])
native Profile_SetRegisterDate(playerid, date[])
native Profile_SetInfo(playerid, text[])

Else i can do all that. I mean status?? How should i write that? Pretty confusing. Please help bro!
Reply
#11

SEXY!!!

One of the best scripts on the samp forums in my opinion, thankyou!

Kind Regards,
MadSkillz
Reply
#12

Very nice! It looks very nice : ).
Reply
#13

You released it o:
Awesome!
Reply
#14

Made a /setrep CMD! using zcmd and sscanf2. But the problem it works sometimes. Sometimes doesnt. I cant set my rep from 9000 to 0. Idk! Can you give me proper working CMD (Admin CMD's)?

How to use settrusted function? bool? what do i need to set it to?

Im fucked up confused please help iPleo!
pawn Code:
CMD:setrep(playerid, params[])
{
    new level, id;
    if(sscanf(params, "ud", id, level))
    {
        if (IsPlayerAdmin(playerid))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setrep [playerid] [rep points]");
        }
        else return SendClientMessage(playerid, COLOR_WHITE, "You are not authorised to use this command!");
    }
    else
    {
        if (IsPlayerAdmin(playerid))
        {
            Profile_Reputation[id] = level;
            SendClientMessage(id, COLOR_WHITE, "[PROFILE] You have recieved rep points. /saveprofile to save it or Relog!");
        }
    }
    return 1;
}
Even when we GMX while viewing our profile. After the GM , The profile looks like this? IDK why.
http://tinypic.com/r/11c4obp/5

As well as , after disconnecting. I dont see any kind of file containing data of our profile in my Profiles folder of scriptfiles? How come.
Reply
#15

E P I C :O
nice job!
i would give u rep if i could xD
Reply
#16

When I said the first time 'Release it!' I thought that you wont release it , even if 100 users say "yes" but u did it!

Awesome script ! 11/10
Reply
#17

pawn Code:
CMD:giverep(playerid, params[])
{

    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You are not authorised to use this command!");
    new playerid2, rep;
    if(sscanf(params, "ud", playerid2, rep)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giverep [playerid] [rep points]");
    Profile_GiveRep(playerid, rep);
}
Reply
#18

Awesome Good job
Reply
#19

awesome
thank's!
would be better if it would be file-based on y_ini :P
Reply
#20

Awesome work my friend.. Really Awesome..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)