Need help in includes - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help in includes (
/showthread.php?tid=277840)
Need help in includes -
ServerScripter - 19.08.2011
Hey all , i would like to have an Include (very short+simple to use) (i would creat VIP system+admins system + some commands with It) Please HELP
Re: Need help in includes -
Tanush123 - 19.08.2011
pawn Код:
enum pData
{
AdminLevel
}
new Logged[MAX_PLAYERS];
new PlayerData[MAX_PLAYERS][pData];
search include zcmd and sscanf and this is my setadmin
pawn Код:
CMD:setadmin(playerid, params[])
{
new str[128],ID,alevel,Nam[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid))return 0;
if(sscanf(params,"ui",ID,alevel)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /setadmin [ID] [Level 1-5]");
if(alevel > 5) return SendClientMessage(playerid,0xFF0000FF,"AVAILABLE LEVELS 1-5!");
if(!IsPlayerConnected(ID))return SendClientMessage(playerid,red,"That user is not connected.");
if(PlayerData[ID][AdminLevel] == alevel) return SendClientMessage(playerid,0xFF0000FF, "ERROR: That person is already this admin level!");
GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);
GetPlayerName(ID,pname,MAX_PLAYER_NAME);
if(alevel == 0)
{
format(str, sizeof(str),"%s has your Admin level to %d on the server. *cry *cry",Nam,alevel);
SendClientMessage(ID,0xFF9900AA,str);
format(str, sizeof(str),"You had set %s Admin level to %d!",pname,alevel);
SendClientMessage(playerid,0xFF9900AA,str);
PlayerData[ID][AdminLevel] = alevel;
return 1;
}
format(str, sizeof(str),"%s has your Admin level to %d on the server.",Nam,alevel);
SendClientMessage(ID,0xFF9900AA,str);
format(str, sizeof(str),"You had set %s Admin level to %d!",pname,alevel);
SendClientMessage(playerid,0xFF9900AA,str);
PlayerData[ID][AdminLevel] = alevel;
return 1;
}
Use the idea on top and change it to vip
Re: Need help in includes -
ServerScripter - 19.08.2011
Not Bad, but i want a Only One include to do all that
Re: Need help in includes -
Tanush123 - 19.08.2011
Sorry dude cause i use #include zcmd #sscanf for commands that i use for admins and vips
Re: Need help in includes -
ServerScripter - 19.08.2011
NP bro , but i would make or have a One Inculde (why simple? because i want creat my cmds like a FS with this includ)
Some feactures :
Register+Login System(it saves name+Money+pass+kills+admin+Vip+rank+faction
Admin system(with basics CMD like :Ban/Kick/warn/freeze/jail/slap/mute/)
VIP(i ask the commands later )
playerCMDS(/help /commands /changepass /report)
thath's all
Re: Need help in includes -
ServerScripter - 19.08.2011
UP ..........
Re : Need help in includes -
Naruto_Emilio - 19.08.2011
Try this System
http://forum.sa-mp.com/showthread.ph...ght=VIP+System