29.02.2012, 15:19
(
Последний раз редактировалось iPLEOMAX; 02.04.2012 в 09:14.
)
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:- 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
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"
- 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[])
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;
}
- 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.
- 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)
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)
- Zamaroht's Textdraw Editor.
- Zh3r0's Sprite Editor.