27.02.2011, 22:30
(
Последний раз редактировалось tanush; 27.02.2011 в 22:30.
Причина: ur mom
)
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf>
#if defined FILTERSCRIPT
//Colours//
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000FF
#define COLOR_YELLOW 0xFF0000FF
#define gray 0x555555FF
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_SEAGREEN 0x20B2AAAA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SEAGREEN 0x2E8B57AA
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
//colours//
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
COMMAND:setadmin(playerid, params[])
{
new id,alevel;
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFFFFFFAA,"SERVER: Unknown command");
if(sscanf(params,"ui", id,alevel))return SendClientMessage(playerid, 0xFF9900AA, "Usage: /setadmin1 [id] [level 1 - 4]");
if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, 0xFF0000FF, "Player not found");
if(PlayerData[id][AdminLevel] == 1) return SendClientMessage(playerid,0xFF0000FF,"That player is already an admin.");
if(alevel > 4)return SendClientMessage(playerid,0xFF0000FF,"Levels currently avaliable: 1 - 4");
if(alevel == 1)
{
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
GetPlayerName(id,pname,MAX_PLAYER_NAME);
format(String, sizeof(String),"[AdminChat] %s has set %s to a level 1 admin on the server.",Name,pname);
MessageToAdmins(0xFF9900AA, String);
format(String, sizeof(String),"Congratulations, you have earned the postion of an Admin on the server. Please type /acmds to see the commands.");
SendClientMessage(id,0xFF9900AA,String);
PlayerData[id][AdminLevel] = 1;
PlayerData[playerid][IsAdmin] = 1;
PlayerData[id][IsAdmin] = 1;
}
if(alevel == 2)
{
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(file,sizeof(file),USER_FILES, pname);
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
GetPlayerName(id,pname,MAX_PLAYER_NAME);
format(String, sizeof(String),"[AdminChat] %s has set %s to a level 2 admin on the server.",Name,pname);
MessageToAdmins(0xFF9900AA, String);
format(String, sizeof(String),"Congratulations, you have earned the postion of an Admin on the server. Please type /acmds to see the commands.");
SendClientMessage(id,0xFF9900AA,String);
PlayerData[id][AdminLevel] = 2;
PlayerData[playerid][IsAdmin] = 1;
PlayerData[id][IsAdmin] = 1;
}
if(alevel == 3)
{
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
GetPlayerName(id,pname,MAX_PLAYER_NAME);
format(String, sizeof(String),"[AdminChat] %s has set %s to a level 3 admin on the server.",Name,pname);
MessageToAdmins(0xFF9900AA, String);
format(String, sizeof(String),"Congratulations, you have earned the postion of an Admin on the server. Please type /acmds to see the commands.");
SendClientMessage(id,0xFF9900AA,String);
PlayerData[id][AdminLevel] = 3;
PlayerData[playerid][IsAdmin] = 1;
PlayerData[id][IsAdmin] = 1;
}
if(alevel == 4)
{
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
GetPlayerName(id,pname,MAX_PLAYER_NAME);
format(String, sizeof(String),"[AdminChat] %s has set %s to a level 4 admin on the server.",Name,pname);
MessageToAdmins(0xFF9900AA, String);
format(String, sizeof(String),"Congratulations, you have earned the postion of an Admin on the server. Please type /acmds to see the commands.");
SendClientMessage(id,0xFF9900AA,String);
PlayerData[id][AdminLevel] = 4;
PlayerData[playerid][IsAdmin] = 1;
PlayerData[id][IsAdmin] = 1;
}
return 1;
}