18.11.2014, 12:06
(
Последний раз редактировалось ATGOggy; 18.11.2014 в 12:11.
Причина: Edit
)
PHP код:
#include <a_samp>
#include <file>
#include "../include/gl_common.inc"
#include <LocalChat>
#include <YSI\y_ini>
#include <sscanf>
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
new playername[128];
new wantedlevel=0;
new score=0;
new life=0;
new muted[128];
//admincommands
new adminlevel=0;
new spectating=0;
new admduty=0;
main()
{
print("\n-----------------------------------------");
print(" San Andreas Roleplay Cops and Robbers");
print(" By Amal M");
print("-----------------------------------------\n");
}
//colors
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF
#define COLOR_ADMINBLUE 0x0080FFFF
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
//User system dialogs
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
enum pInfo
{
pPass,
pCash,
pAdmin,
pScore,
pBanned,
pBanreason,
pAdminwhobanned,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
INI_Int("Banned",PlayerInfo[playerid][pBanned]);
INI_Int("Banreason",PlayerInfo[playerid][pBanreason]);
INI_Int("Adminwhobanned",PlayerInfo[playerid][pAdminwhobanned]);
return 1;
}
stock UserPath(playerid)
{
new string[128];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
stock udb_hash(buf[]) {
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
public OnGameModeInit()
{
SetGameModeText("Roleplay/Cops and Robbers");
//Vehicles
LoadStaticVehiclesFromFile("vehicles/flint.txt");
LoadStaticVehiclesFromFile("vehicles/bone.txt");
LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
LoadStaticVehiclesFromFile("vehicles/pilots.txt");
LoadStaticVehiclesFromFile("vehicles/red_county.txt");
LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
LoadStaticVehiclesFromFile("vehicles/sf_terrain.txt");
LoadStaticVehiclesFromFile("vehicles/tierra.txt");
LoadStaticVehiclesFromFile("vehicles/trains.txt");
LoadStaticVehiclesFromFile("vehicles/trainsplatform.txt");
LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
//Server Vehicles
AddStaticVehicle(411,1921.8412,-1763.8225,13.2575,269.7150,128,128);
// Player Classes
//[Cops]
AddPlayerClass(71,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(163,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(164,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(165,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(166,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(211,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(281,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(282,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(283,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(284,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(286,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(288,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(265,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(266,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
AddPlayerClass(267,1584.6842,-1686.7813,6.2188,290.3138,32,2500,26,1000,31,2500);
//[SWAT]
AddPlayerClass(285,2523.1890,-2118.1357,13.5469,355.3507,32,2500,26,1000,31,2500);
//[ARMY]
AddPlayerClass(287,253.5259,1879.8744,11.4609,95.0310,32,2500,26,1000,31,2500);
AddPlayerClass(179,253.5259,1879.8744,11.4609,95.0310,32,2500,26,1000,31,2500);
//[Civillians]
AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(3,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(4,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(5,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(6,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(7,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(8,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(9,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(10,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(11,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(12,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(13,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(14,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(15,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(16,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(17,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(18,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(19,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(20,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(21,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(22,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(23,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(24,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(25,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(26,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(27,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(28,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(29,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(30,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(31,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(32,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(33,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(34,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(35,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(36,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(37,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(38,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(39,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(40,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(41,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(43,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(44,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(45,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(46,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(59,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(60,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(61,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(62,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(63,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(64,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(65,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(66,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(67,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(86,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(90,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(94,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(100,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(101,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(102,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(103,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(104,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(105,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(106,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(107,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(108,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(109,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(110,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(111,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(112,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(113,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(114,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(115,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(116,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(117,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(118,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(119,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(120,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(121,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(122,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(123,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(124,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(125,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(126,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(127,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(128,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(129,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(130,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(131,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(132,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(134,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(135,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(136,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(137,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(138,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(139,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(140,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(141,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(142,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(143,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(144,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(145,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(146,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(147,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(148,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(149,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(150,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(151,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(152,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(153,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(154,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(156,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(157,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(158,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(159,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(160,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(161,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(162,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(163,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(164,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(165,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(166,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(167,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(168,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(169,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(170,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(171,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(172,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(173,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(174,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(175,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(176,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(177,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(178,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(179,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(180,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(181,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(182,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(183,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(184,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(185,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(186,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(187,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(188,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(189,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(190,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(191,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(192,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(193,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(194,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(195,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(196,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(197,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(198,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(199,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(200,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(201,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(202,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(203,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(204,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(205,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(206,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(207,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(208,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(209,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(210,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(212,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(213,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(214,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(215,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(216,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(217,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(218,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(219,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(221,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(222,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(223,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(224,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(225,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(226,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(227,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(228,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(229,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(230,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(231,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(232,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(233,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(234,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(235,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(236,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(237,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(238,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(239,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(240,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(241,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(242,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(243,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(244,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(245,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(246,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(247,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(248,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(249,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(250,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(251,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(252,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(253,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(254,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(255,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(256,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(257,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(258,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(259,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(260,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(261,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(262,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(263,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(264,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(271,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(272,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(273,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(290,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(291,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(292,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(293,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(294,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(295,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(296,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(297,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(298,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(299,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
//[MECHANICS]
AddPlayerClass(42,841.3635,-1865.6621,13.3897,94.0425,32,2500,26,1000,31,2500);
AddPlayerClass(268,841.3635,-1865.6621,13.3897,94.0425,32,2500,26,1000,31,2500);
//[TAXI DRIVERS]
AddPlayerClass(142,1695.5009,-2325.5298,13.5469,359.0902,32,2500,26,1000,31,2500);
AddPlayerClass(220,1695.5009,-2325.5298,13.5469,359.0902,32,2500,26,1000,31,2500);
//[MEDIC]
AddPlayerClass(274,2023.0836,-1418.7443,16.9922,140.5513,32,2500,26,1000,31,2500);
AddPlayerClass(275,2023.0836,-1418.7443,16.9922,140.5513,32,2500,26,1000,31,2500);
AddPlayerClass(276,2023.0836,-1418.7443,16.9922,140.5513,32,2500,26,1000,31,2500);
//[FIREMEN]
AddPlayerClass(277,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(278,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(279,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
//[PIZZA BOY]
AddPlayerClass(155,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
AddPlayerClass(167,1759.0189,-1898.1260,13.5622,266.4503,32,2500,26,1000,31,2500);
UsePlayerPedAnims();
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,1442.0126,-869.8841,52.4946);
SetPlayerFacingAngle(playerid,196.9944);
SetPlayerCameraPos(playerid,1443.3689,-873.9153,52.8520);
SetPlayerCameraLookAt(playerid,1442.0126,-869.8841,52.4946);
return 1;
}
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, playername, sizeof(playername));
new joining[128];
format (joining, sizeof(joining), "%s has joined San Andreas Roleplay/Cops and Robbers.", playername);
SendClientMessageToAll(COLOR_GREY, joining);
new File:log=fopen("Logs/Mainlog.log", io_append);
new string[128];
format (string, sizeof(string), "%s has joined.\r\n", playername);
fwrite(log, string);
fclose(log);
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(PlayerInfo[playerid][pBanned]==0)
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
}
else
{
new loginban[128], banreason[128], adminwhobanned[128];
format(loginban,sizeof(loginban),"Auto-kick: %s has been kicked from the server (Reason: Banned).", playername);
SendClientMessageToAll(COLOR_BRIGHTRED, loginban);
SendClientMessage(playerid, COLOR_ORANGE, "");
SendClientMessage(playerid, COLOR_ORANGE, "");
SendClientMessage(playerid, COLOR_ORANGE, "");
SendClientMessage(playerid, COLOR_ORANGE, "");
SendClientMessage(playerid, COLOR_ORANGE, "If you believe this ban is unfair, you can appeal for unban at sa-rcr.com/forum.");
SendClientMessage(playerid, COLOR_ORANGE, "Note:Cheaters won't be unbanned.");
SendClientMessage(playerid, COLOR_ORANGE, "Note: Don't play in other account while you are banned (ban evade), you will never get unbanned if you do that.");
format(banreason, sizeof(banreason), "REASON: %s", PlayerInfo[playerid][pBanreason]);
SendClientMessage(playerid, COLOR_BRIGHTRED, banreason);
format(adminwhobanned, sizeof(adminwhobanned), "ADMIN WHO BANNED: %s", playername);
SendClientMessage(playerid, COLOR_BRIGHTRED, adminwhobanned);
SetTimerEx("kickbanlogin", 1000, false, "i", playerid);
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Register",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
}
return 1;
}
forward kickbanlogin(playerid);
public kickbanlogin(playerid)
{
Kick(playerid);
}
public OnPlayerDisconnect(playerid, reason)
{
new leaving[128];
format (leaving, sizeof(leaving), "%s has left the server (Reason:%s).", playername, reason);
SendClientMessage(playerid, COLOR_GREY, leaving);
new File:log=fopen("Logs/Mainlog.log", io_append);
new string[128];
format (string, sizeof(string), "%s has left.\r\n", playername);
fwrite(log, string);
fclose(log);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Score",GetPlayerScore(playerid));
INI_Close(File);
return 1;
}
public OnPlayerSpawn(playerid)
{
life=1;
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 46, 5);
GivePlayerWeapon(playerid, 24, 200);
SetPlayerArmour(playerid, 100.0);
SetPlayerColor(playerid, COLOR_WHITE);
new File:log=fopen("Logs/MainLog.log", io_append);
new string[128];
format (string, sizeof(string), "%s has spawned.\r\n", playername);
fwrite(log, string);
fclose(log);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new File:log=fopen("Logs/Mainlog.log", io_append);
new string[128];
format (string, sizeof(string), "%s has died.\r\n", playername);
fwrite(log, string);
fclose(log);
life=0;
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
if(muted[playerid] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: You cannot send chat messages while you are muted.");
return 1;
}
// /kick[dcmd]
dcmd_kick(playerid, params[])
{
new reason[128], pID;
if(adminlevel == 0) return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel<3) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(sscanf(params, "us", pID, reason)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /kick [name/id] [reason]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
if(playerid == pID) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: You cannot kick yourself.");
new pIDadminlevel;
INI_ParseFile(UserPath(pID), "LoadUser_%s", .bExtra = true, .extra = pID);
pIDadminlevel= PlayerInfo[pID][pAdmin];
if(pIDadminlevel > 0) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: You cannot kick another admin.");
if(adminlevel == 10)
{
new amalkickserver[128], pIDname[128], amalkickclient[128], amalkick[128];
GetPlayerName(pID, pIDname, sizeof(pIDname));
format(amalkickclient, sizeof(amalkickclient), "You have been kicked from the server by Senior Admin AmalM (Reason: %s).", reason);
SendClientMessage(pID, COLOR_BRIGHTRED, amalkickclient);
SetTimerEx("kicktimersenior", 1000, false, "i", pID);
format(amalkickserver, sizeof(amalkickserver), "Admin-kick: %s(%d) has been kicked from the server by Senior Admin AmalM (Reason: %s).", pIDname, pID, reason);
SendClientMessageToAll(COLOR_BRIGHTRED, amalkickserver);
format(amalkick, sizeof(amalkick), "AmalM, You have kicked %s(%d) from the server (Reason: %s).", pIDname, pID, reason);
SendClientMessage(playerid, COLOR_ADMINBLUE, amalkick);
return 1;
}
else
{
new pIDname[128], kickserver[128], kickclient[128], kicka[128];
GetPlayerName(pID, pIDname, sizeof(pIDname));
format(kickclient, sizeof(kickclient), "You have been kicked from the server (Reason: %s).", reason);
SendClientMessage(pID, COLOR_BRIGHTRED, kickclient);
SetTimerEx("kicktimerjunior", 1000, false, "i", pID);
format(kickserver, sizeof(kickserver), "Admin-kick: %s(%d) has been kicked from the server (Reason: %s).", pIDname, pID, reason);
SendClientMessageToAll(COLOR_BRIGHTRED, kickserver);
format(kicka, sizeof(kicka), "You have kicked %s(%d) from the server (Reason: %s).", pIDname, pID, reason);
SendClientMessage(playerid, COLOR_ADMINBLUE, kicka);
return 1;
}
}
forward kicktimersenior(pID);
public kicktimersenior(pID)
{
Kick(pID);
}
forward kicktimerjunior(pID);
public kicktimerjunior(pID)
{
Kick(pID);
}
// /ban[dcmd]
dcmd_ban(playerid, params[])
{
new reason[128], pID;
if(adminlevel == 0) return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel<4) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(sscanf(params, "us", pID, reason)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /ban [name/id] [reason]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
if(playerid == pID) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: You cannot ban yourself.");
new pIDadminlevel;
INI_ParseFile(UserPath(pID), "LoadUser_%s", .bExtra = true, .extra = pID);
pIDadminlevel= PlayerInfo[pID][pAdmin];
if(pIDadminlevel > 0) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: You cannot ban another admin.");
if(adminlevel == 10)
{
new amalbanserver[128], pIDname[128], amalbanclient[128], amalban[128];
GetPlayerName(pID, pIDname, sizeof(pIDname));
format(amalbanclient, sizeof(amalbanclient), "You have been banned from the server by Senior Admin AmalM (Reason: %s).", reason);
SendClientMessage(pID, COLOR_BRIGHTRED, amalbanclient);
new INI:File = INI_Open(UserPath(pID));
INI_WriteInt(File,"Banned",1);
INI_WriteInt(File,"Banreason", udb_hash(reason));
INI_WriteInt(File,"Adminwhobanned", udb_hash(playername));
new messagebanreason[128], messagebanadmin[128];
SendClientMessage(pID, COLOR_GREY, "If you believe this ban is unfair, you can appeal for unban at sa-rcr.com/forum.");
SendClientMessage(pID, COLOR_GREY, "Note: Cheaters won't be unbanned");
format(messagebanreason, sizeof(messagebanreason), "REASON: %s", reason);
SendClientMessage(pID, COLOR_BRIGHTRED, messagebanreason);
format(messagebanadmin, sizeof(messagebanadmin), "ADMIN WHO BANNED: %s", playername);
SendClientMessage(pID, COLOR_BRIGHTRED, messagebanadmin);
SetTimerEx("bantimersenior", 1000, false, "i", pID);
format(amalbanserver, sizeof(amalbanserver), "Admin-ban: %s(%d) has been banned from the server by Senior Admin AmalM (Reason: %s).", pIDname, pID, reason);
SendClientMessageToAll(COLOR_BRIGHTRED, amalbanserver);
format(amalban, sizeof(amalban), "AmalM, You have banned %s(%d) from the server (Reason: %s).", pIDname, pID, reason);
SendClientMessage(playerid, COLOR_ADMINBLUE, amalban);
return 1;
}
else
{
new pIDname[128], kickserver[128], kickclient[128], kicka[128];
GetPlayerName(pID, pIDname, sizeof(pIDname));
SendClientMessage(playerid, COLOR_ORANGE, "");
format(kickclient, sizeof(kickclient), "You have been banned from the server (Reason: %s).", reason);
SendClientMessage(pID, COLOR_BRIGHTRED, kickclient);
new INI:File = INI_Open(UserPath(pID));
INI_WriteInt(File,"Banned",1);
INI_WriteInt(File,"Banreason", udb_hash(reason));
INI_WriteInt(File,"Adminwhobanned", udb_hash(playername));
new messagebanreason[128], messagebanadmin[128];
SendClientMessage(pID, COLOR_ORANGE, "If you believe this ban is unfair, you can appeal for unban at sa-rcr.com/forum.");
SendClientMessage(pID, COLOR_ORANGE, "Note: Cheaters won't be unbanned");
SendClientMessage(pID, COLOR_ORANGE, "Note: Don't play in other account while you are banned (ban evade), you will never get unbanned if you do that.");
format(messagebanreason, sizeof(messagebanreason), "REASON: %s", reason);
SendClientMessage(pID, COLOR_BRIGHTRED, messagebanreason);
format(messagebanadmin, sizeof(messagebanadmin), "ADMIN WHO BANNED: %s", playername);
SendClientMessage(pID, COLOR_BRIGHTRED, messagebanadmin);
SetTimerEx("bantimerjunior", 1000, false, "i", pID);
format(kickserver, sizeof(kickserver), "Admin-kick: %s(%d) has been banned from the server (Reason: %s).", pIDname, pID, reason);
SendClientMessageToAll(COLOR_BRIGHTRED, kickserver);
format(kicka, sizeof(kicka), "You have banned %s(%d) from the server (Reason: %s).", pIDname, pID, reason);
SendClientMessage(playerid, COLOR_ADMINBLUE, kicka);
return 1;
}
}
forward bantimersenior(pID);
public bantimersenior(pID)
{
Kick(pID);
}
forward bantimerjunior(pID);
public bantimerjunior(pID)
{
Kick(pID);
}
// /packet[dcmd]
dcmd_packet(playerid, params[])
{
new pID;
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel==1) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /packet [name/id]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
GivePlayerWeapon(pID, 34, 100);
GivePlayerWeapon(pID, 46, 0);
GivePlayerWeapon(pID, 24, 200);
GivePlayerWeapon(pID, 32, 2500);
GivePlayerWeapon(pID, 26, 1000);
GivePlayerWeapon(pID, 31, 2000);
SetPlayerArmour(pID, 100.0);
GivePlayerMoney(pID, 15000);
return 1;
}
// /slap[dcmd]
dcmd_slap(playerid, params[])
{
new pID, slapserver[128], pIDname[128];
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct uage: /slap [name/id]");
if(playerid==pID) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: You cannot slap yourself");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
SendClientMessage(pID, COLOR_ORANGE, "You have been slapped by an admin. Ouch.");
GameTextForPlayer(pID, "~r~SLAPPED", 2000, 4);
GetPlayerName(pID, pIDname, sizeof(pIDname));
format(slapserver, sizeof(slapserver), "%s(%d) has been slapped by an admin.", pIDname, pID);
SendClientMessageToAll(COLOR_BRIGHTRED, slapserver);
return 1;
}
// /tptome[dcmd]
new Float:adminx, Float:adminy, Float:adminz;
dcmd_tptome(playerid, params[])
{
new pID;
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel==1) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /tptome [name/id]");
if(playerid==pID) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: The requested player is you.");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
GetPlayerPos(playerid, adminx, adminy, adminz);
SendClientMessage(playerid, COLOR_ADMINBLUE, "The requested player will teleport to your location in 10 seconds.");
SendClientMessage(playerid, COLOR_ADMINBLUE, "Please move from your current position inorder to avoid a bug.");
SetTimerEx("tptome", 10000, false, "ii", pID, playerid);
return 1;
}
forward tptome(pID, playerid);
public tptome(pID, playerid)
{
SetPlayerPos(pID, adminx, adminy, adminz);
SendClientMessage(playerid, COLOR_ADMINBLUE, "The requested player has been teleported to your location successfully.");
SendClientMessage(pID, COLOR_ORANGE, "An admin has teleported you to his position.");
}
// /tptoplayer[dcmd]
new Float:playerx,Float:playery, Float:playerz;
dcmd_tptoplayer(playerid, params[])
{
new pID;
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel==1) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /tptoplayer [name/id]");
if(playerid==pID) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: The requested player is you.");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
GetPlayerPos(pID, playerx, playery, playerz);
GetPlayerPos(playerid, adminx, adminy, adminz);
SendClientMessage(playerid, COLOR_ADMINBLUE, "You will be teleported to the requested player's position in 5 seconds.");
SetTimerEx("tptoplayer", 5000, false, "ii", pID, playerid);
return 1;
}
forward tptoplayer(pID, playerid);
public tptoplayer(pID, playerid)
{
SetPlayerPos(playerid, playerx, playery, playerz);
SendClientMessage(playerid, COLOR_ADMINBLUE, "You have been successfully teleported to the requested player's position.");
}
// /spectate[dcmd]
dcmd_spectate(playerid, params[])
{
new pID, vehicleid;
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE, "Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel<2) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correcy usage: /spectate [name/id]");
if(playerid==pID) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: The requested player is you.");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
if(IsPlayerInAnyVehicle(pID))
{
TogglePlayerSpectating(playerid, 1);
vehicleid=GetPlayerVehicleID(pID);
PlayerSpectateVehicle(playerid, vehicleid);
spectating=1;
}
else
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, pID);
spectating=1;
}
return 1;
}
// /mute[dcmd]
dcmd_mute(playerid, params[])
{
new pID, time, reason[128];
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE, "Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel<2) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(sscanf(params, "uds", pID, time, reason)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /mute [name/id] [seconds] [reason]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This player is not connected.");
if(playerid==pID) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: You cannot mute yourself.");
new pIDadminlevel;
INI_ParseFile(UserPath(pID), "LoadUser_%s", .bExtra = true, .extra = pID);
pIDadminlevel= PlayerInfo[pID][pAdmin];
if(pIDadminlevel>0)
{
if(adminlevel==10)
{
muted[pID] = 1;
new amalmuteclient[128], amalmuteserver[128];
format(amalmuteclient, sizeof(amalmuteclient), "You have been muted by the Senior Admin AmalM for %d seconds (Reason: %s).", time, reason);
SendClientMessage(pID, COLOR_BRIGHTRED, amalmuteclient);
new pName[128];
GetPlayerName(pID, pName, sizeof(pName));
format(amalmuteserver, sizeof(amalmuteserver), "Admin-mute: %s(%d) has been muted by the Senior Admin AmalM for %d seconds (Reason: %s).", pName, pID, time, reason);
SendClientMessageToAll(COLOR_BRIGHTRED, amalmuteserver);
SetTimerEx("amalmute", time*1000, false, "is", pID, pName);
}
else
{
muted[pID] = 1;
new muteclient[128], muteserver[128];
format(muteclient, sizeof(muteclient), "You have been muted by an admin for %d seconds (Reason: %s).", time, reason);
SendClientMessage(pID, COLOR_BRIGHTRED, muteclient);
new pName[128];
GetPlayerName(pID, pName, sizeof(pName));
format(muteserver, sizeof(muteserver), "Admin-mute: %s(%d) has been muted for %d seconds (Reason: %s).", pName, pID, time, reason);
SendClientMessageToAll(COLOR_BRIGHTRED, muteserver);
SetTimerEx("mute", time*1000, false, "i", pID, pName);
}
}
return 1;
}
forward amalmute(pID, pName);
public amalmute(pID, pName)
{
muted[pID] = 0;
SendClientMessage(pID, COLOR_BRIGHTRED, "You have been auto-unmuted.");
new unmuted[128];
format(unmuted, sizeof(unmuted), "Auto-unmute: %s(%d) has been auto-unmuted.", pName, pID);
SendClientMessageToAll(COLOR_BRIGHTRED, unmuted);
return 1;
}
forward mute(pID, pName);
public mute(pID, pName)
{
muted[pID] = 0;
SendClientMessage(pID, COLOR_BRIGHTRED, "You have been auto-unmuted.");
new unmuted[128];
format(unmuted, sizeof(unmuted), "Auto-unmute: %s(%d) has been auto-unmuted.", pName, pID);
SendClientMessageToAll(COLOR_BRIGHTRED, unmuted);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
// /help
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, " Read /rules and /pc. Type /commands to see the commands available for you.");
return 1;
}
// /kill
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
wantedlevel=GetPlayerWantedLevel(playerid);
if (life==1)
{
if (wantedlevel==0)
{
new suicide[128];
format (suicide, sizeof(suicide), "%s has committed suicide using /kill.", playername);
SendClientMessageToAll(COLOR_BRIGHTRED, suicide);
SetPlayerHealth(playerid, 0.0);
score=GetPlayerScore(playerid);
score--;
SetPlayerScore(playerid, score);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You cannot use this command when cops are looking for you.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_ORANGE,"You are already dead.");
return 1;
}
}
// /me
if (strcmp(cmdtext, "/me ", true, 4) == 0)
{
if(!cmdtext[4])return SendClientMessage(playerid, COLOR_ORANGE, "Correct Usage: /me [action]");
if(muted[playerid] > 0) return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command when you are muted.");
new actionme[128];
format (actionme, sizeof(actionme), "*%s %s", playername, cmdtext[4]);
SendLocalMessage(playerid, COLOR_PINK, 7, actionme);
return 1;
}
// /do
if (strcmp(cmdtext,"/do ", true, 4) == 0)
{
if(!cmdtext[4])return SendClientMessage(playerid, COLOR_ORANGE, "Correct Usage: /do [message]");
if(muted[playerid] > 0) return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command when you are muted.");
new actiondo[128];
format (actiondo, sizeof(actiondo), "*%s((%s))", cmdtext[4], playername);
SendLocalMessage(playerid,COLOR_PINK,7, actiondo);
return 1;
}
// /do
if (strcmp(cmdtext, "/w ", true, 3) == 0)
{
if(!cmdtext[3])return SendClientMessage(playerid, COLOR_ORANGE, "Correct Usage: /w [message]");
if(muted[playerid] > 0) return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command when you are muted.");
new wmessage[128];
format (wmessage, sizeof(wmessage), "(Local) %s(%d): %s", playername, playerid, cmdtext[3]);
SendLocalMessage(playerid, COLOR_YELLOW, 7, wmessage);
return 1;
}
// /cc
if(strcmp(cmdtext, "/cc", true, 15) == 0)
{
if(adminlevel>0)
{
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "");
SendClientMessageToAll(COLOR_ORANGE, "An admin has cleared the chat.");
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
}
return 1;
}
// /announce
if(strcmp(cmdtext, "/announce ", true, 10) == 0)
{
if(adminlevel>0)
{
if(!cmdtext[10]) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /announce [message]");
SendClientMessageToAll(COLOR_ADMINBLUE, cmdtext[10]);
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
}
return 1;
}
// /stopspectate
if(strcmp(cmdtext, "/stopspectate", true, 20) == 0)
{
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
if(adminlevel<2) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: This command is unavailable for your admin rank.");
if(spectating==0) return SendClientMessage(playerid, COLOR_ADMINBLUE, "ERROR: You are not spectating anyone.");
TogglePlayerSpectating(playerid, 0);
return 1;
}
// /adm
if(strcmp(cmdtext, "/adm ", true, 5) == 0)
{
if(adminlevel==0) return SendClientMessage(playerid, COLOR_WHITE, "Server: Unrecognized command, type /commands to see the commands available for you.");
if(!cmdtext[5]) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /adm [message]");
for(new i=0; i<MAX_PLAYERS; i++)
{
new iadminlevel;
INI_ParseFile(UserPath(i), "LoadUser_%s", .bExtra = true, .extra = i);
iadminlevel= PlayerInfo[i][pAdmin];
new admmessage[128];
format(admmessage, sizeof(admmessage), "(Admin Chat) %s: %s", playername, cmdtext[5]);
if(iadminlevel>0) return SendClientMessage(i, COLOR_ADMINBLUE, admmessage);
}
return 1;
}
// /kick
dcmd (kick, 4, cmdtext);
// /ban
dcmd (ban, 3, cmdtext);
// /packet
dcmd (packet, 6, cmdtext);
// /slap
dcmd (slap, 4, cmdtext);
// /tptome
dcmd (tptome, 6, cmdtext);
// /tptoplayer
dcmd (tptoplayer, 10, cmdtext);
// /spectate
dcmd (spectate, 8, cmdtext);
// /mute
dcmd (mute, 4, cmdtext);
return SendClientMessage(playerid, COLOR_WHITE,"Server: Unrecognized command, type /commands to see the commands available for you.");
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
SendClientMessage(playerid, COLOR_INDIGO, "Your name should not contain spaces.");
SendClientMessage(playerid, COLOR_INDIGO, "If you need to seperate your last name, don't use space, use _ instead.");
SendClientMessage(playerid, COLOR_INDIGO, "If your current name have spaces, please relog now with a valid name.");
if (!response)
{
new stringserver[128];
SendClientMessage(playerid, COLOR_BRIGHTRED, "You have been kicked from the server (Reason: Failed to register).");
Kick (playerid);
format(stringserver, sizeof(stringserver), "Auto-kick: %s has been kicked from the server (Reason: Failed to register).", playername);
SendClientMessageToAll(COLOR_BRIGHTRED, stringserver);
return 1;
}
else if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Register.",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File, "Admin",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Banned",0);
INI_WriteInt(File,"Banreason",0);
INI_WriteInt(File,"Adminwhobanned",0);
INI_Close(File);
new playerip[128], ipinlog[128], registered[128];
GetPlayerIp(playerid, playerip, sizeof(playerip));
new File:log=fopen("Logs/Mainlog.log", io_append);
format(ipinlog, sizeof(ipinlog), "Player IP (%s) = %s", playername, playerip);
fwrite(log, ipinlog);
format(registered, sizeof(registered), "%s has registered.", playername);
fwrite(log, registered);
fclose(log);
new userpath[128];
format(userpath, sizeof(userpath), "UserIPs/%s.txt", playername);
new File:userip=fopen(userpath, io_append);
fwrite(userip, playerip);
fclose(userip);
SpawnPlayer(playerid);
new registersuccess[128];
format(registersuccess, sizeof(registersuccess),"Great! You have been successfully registered under the password %s.", inputtext);
SendClientMessage(playerid, COLOR_GREEN, registersuccess);
}
}
case DIALOG_LOGIN:
{
if ( !response )
{
new stringserver[128];
SendClientMessage(playerid, COLOR_BRIGHTRED, "You have been kicked from the server (Reason: Failed to login).");
Kick (playerid);
format(stringserver, sizeof(stringserver), "Auto-kick: %s has been kicked from the server (Reason: Failed to login).", playername);
SendClientMessageToAll(COLOR_BRIGHTRED, stringserver);
return 1;
}
else if( response )
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
adminlevel=PlayerInfo[playerid][pAdmin];
SendClientMessage(playerid, COLOR_GREEN, "You have been successfully logged in. Enjoy!");
new playerip[128], ipinlog[128], loggedin[128];
GetPlayerIp(playerid, playerip, sizeof(playerip));
new File:log=fopen("Logs/Mainlog.log", io_append);
format(ipinlog, sizeof(ipinlog), "Player IP (%s) = %s", playername, playerip);
fwrite(log, ipinlog);
format(loggedin, sizeof(loggedin), "%s has logged in.", playername);
fwrite(log, loggedin);
fclose(log);
new userpath[128];
format(userpath, sizeof(userpath), "UserIPs/%s.txt", playername);
new File:userip=fopen(userpath, io_append);
new stringplayerip[128];
format(stringplayerip, sizeof(stringplayerip), "\r\n%s", playerip);
fwrite(userip, stringplayerip);
fclose(userip);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
}
return 1;
}
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}