07.08.2016, 07:19
hey guys i get error in script invalid function or declaration but i dont know where
here code
its 673 line but i cant found where
here code
Code:
//-----------------------------------------------------------------------------// //-----------------------------------------------------------------------------// //----------------- Black Angeles Roleplay 2016--------------------------------// //------------------------2016 Dex---------------------------------------------// //-----------------------------------------------------------------------------// //-----------------------------------------------------------------------------// //------------------------------------------------------------------[ Includes #include <a_samp> #include <zcmd> #include <sscanf2> #include <YSI\y_ini> #include <CTime> #include <dini> #include <foreach> native IsValidVehicle(vehicleid); #pragma tabsize 0 #define COL_WHITE "{FFFFFF}" #define COL_RED "{FF0000}" //-------------------------------------------------------------[ Server Limits ] #define MaxPlayers GetMaxPlayers() #define MaxVehicles MAX_VEHICLES #define MaxObjects MAX_OBJECTS //--------------------------------------------------------------------[ Colors ] #define Black "{000000}" #define White "{FFFFFF}" #define Grey "{BFBFBF}" #define Red "{FF0000}" #define Orange "{FFA500}" #define Yellow "{FFFF00}" #define COL_GREEN "{008000}" #define Blue "{0000FF}" #define Purple "{800080}" #define Teal "{008080}" //--------------------------------------------------------------[ Milliseconds ] #define Year 31536000000 // Day x 365 #define Month 2592000000 // Day x 30 #define Week 604800000 // Day x 7 #define Day 86400000 // Hour x 24 #define Hour 3600000 // Minute x 60 #define Minute 60000 // Second x 60 #define Second 1000 // Millisecond x 1000 //-----------------------------------------------------------------[ Variables ] //--------------------------------------------------------------------[ Unused ] //--------------------------------------------------------------------[ Timers ] //----------------------------------------------------------[ Custom Functions ] //---------------------------------------------------------[ Default Callbacks ] //----------------------------------------------------------[New] //---------------------------------------------------------[Enums] enum pInfo { pPass, pCash, pAdmin, pKills, pDeaths } new PlayerInfo[MAX_PLAYERS][pInfo]; //--------------------------------------------------------------------[Defines] #define DIALOG_REGISTER 1 #define DIALOG_LOGIN 2 #define DIALOG_SUCCESS_1 3 #define DIALOG_SUCCESS_2 4 #define PATH "/Users/%s.ini" //////////////////////////////////////Fowardovi////////////////////////////////// return 1; } 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; } stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } stock ImeIgraca(playerid) { new name[255]; GetPlayerName(playerid, name, 255); return name; } stock RPnamecheck(playerid) { new pname[MAX_PLAYER_NAME],underline=0; GetPlayerName(playerid, pname, sizeof(pname)); if(strfind(pname,"[",true) != (-1)) return 0; else if(strfind(pname,"]",true) != (-1)) return 0; else if(strfind(pname,"$",true) != (-1)) return 0; else if(strfind(pname,"(",true) != (-1)) return 0; else if(strfind(pname,")",true) != (-1)) return 0; else if(strfind(pname,"=",true) != (-1)) return 0; else if(strfind(pname,"@",true) != (-1)) return 0; else if(strfind(pname,"1",true) != (-1)) return 0; else if(strfind(pname,"2",true) != (-1)) return 0; else if(strfind(pname,"3",true) != (-1)) return 0; else if(strfind(pname,"4",true) != (-1)) return 0; else if(strfind(pname,"5",true) != (-1)) return 0; else if(strfind(pname,"6",true) != (-1)) return 0; else if(strfind(pname,"7",true) != (-1)) return 0; else if(strfind(pname,"8",true) != (-1)) return 0; else if(strfind(pname,"9",true) != (-1)) return 0; else if(strfind(pname,"fuck",true) != (-1)) return 0; else if(strfind(pname,"FUCK",true) != (-1)) return 0; else if(strfind(pname,"Boobies",true) != (-1)) return 0; else if(strfind(pname,"Tupac_Shakur",true) != (-1)) return 0; else if(strfind(pname,"Pussy",true) != (-1)) return 0; else if(strfind(pname,"Rape",true) != (-1)) return 0; else if(strfind(pname,"kill",true) != (-1)) return 0; else if(strfind(pname,"shit",true) != (-1)) return 0; else if(strfind(pname,"ass",true) != (-1)) return 0; else if(strfind(pname,"Jack_Black",true) != (-1)) return 0; else if(strfind(pname,"Max_Kenton",true) != (-1)) return 0; else if(strfind(pname,"Will_Smith",true) != (-1)) return 0; else if(strfind(pname,"Jaden_Smith",true) != (-1)) return 0; else if(strfind(pname,"Megan_Fox",true) != (-1)) return 0; else if(strfind(pname,"Charlie_Kenton",true) != (-1)) return 0; else if(strfind(pname,"Hugh_Hefner",true) != (-1)) return 0; else if(strfind(pname,"Paris_Hilton",true) != (-1)) return 0; else if(strfind(pname,"Marshall_Mathers",true) != (-1)) return 0; else if(strfind(pname,"Sheldon_Cooper",true) != (-1)) return 0; else if(strfind(pname,"Jet_Lee",true) != (-1)) return 0; else if(strfind(pname,"Jackie_Chan",true) != (-1)) return 0; else if(strfind(pname,"Chuck_Norris",true) != (-1)) return 0; else if(strfind(pname,"Peter_Parker",true) != (-1)) return 0; else if(strfind(pname,"Spider_Man",true) != (-1)) return 0; else if(strfind(pname,"Bat_Man",true) != (-1)) return 0; else if(strfind(pname,"Emma_Stone",true) != (-1)) return 0; else if(strfind(pname,"whore",true) != (-1)) return 0; else if(strfind(pname,"Hugh_Jackman",true) != (-1)) return 0; else if(strfind(pname,"Charles_Kenton",true) != (-1)) return 0; else if(strfind(pname,"Harry_Potter",true) != (-1)) return 0; else if(strfind(pname,"Chris_Hemsworth",true) != (-1)) return 0; else if(strfind(pname,"Penis",true) != (-1)) return 0; else if(strfind(pname,"_Dick",true) != (-1)) return 0; else if(strfind(pname,"Vagina",true) != (-1)) return 0; else if(strfind(pname,"Cock",true) != (-1)) return 0; else if(strfind(pname,"Rectum",true) != (-1)) return 0; else if(strfind(pname,"Sperm",true) != (-1)) return 0; else if(strfind(pname,"Rektum",true) != (-1)) return 0; else if(strfind(pname,"Pistol",true) != (-1)) return 0; else if(strfind(pname,"AK47",true) != (-1)) return 0; else if(strfind(pname,"Shotgun",true) != (-1)) return 0; else if(strfind(pname,"Cum",true) != (-1)) return 0; else if(strfind(pname,"Hitler",true) != (-1)) return 0; else if(strfind(pname,"Jesus",true) != (-1)) return 0; else if(strfind(pname,"God",true) != (-1)) return 0; else if(strfind(pname,"Shotgun",true) != (-1)) return 0; else if(strfind(pname,"Desert_Eagle",true) != (-1)) return 0; else if(strfind(pname,"fucker",true) != (-1)) return 0; else if(strfind(pname,"Retard",true) != (-1)) return 0; else if(strfind(pname,"Tarded",true) != (-1)) return 0; else if(strfind(pname,"fanny",true) != (-1)) return 0; else if(strfind(pname,"Daniel_Hardy",true) != (-1)) return 0; else if(strfind(pname,"abcdefghijklmnopqrstuvwxyz",true) != (-1)) return 0; new maxname = strlen(pname); for(new i=0; i<maxname; i++) { if(pname[i] == '_') underline ++; } if(underline != 1) return 0; pname[0] = toupper(pname[0]); for(new x=1; x<maxname; x++) { if(pname[x] == '_') pname[x+1] = toupper(pname[x+1]); else if(pname[x] != '_' && pname[x-1] != '_') pname[x] = tolower(pname[x]); } SetPlayerName(playerid, "New_Name"); SetPlayerName(playerid, pname); return 1; } stock GetName(playerid) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); return pName; } public OnFilterScriptExit() { return 1; } main() { print("\n----------------------------------"); print(" BARP V.0.1.0 "); print("----------------------------------\n"); } public OnGameModeInit() { SetGameModeText("BA:RP V.0.1.0"); AddPlayerClass(291,1744.5500,-1861.4077,13.5776,350.6742,0,0,0,0,0,0); // El Corona Spawn AddStaticVehicle(416,1123.0322,-1329.0438,13.3955,0.7097,1,3); //Police Maverick AddStaticVehicle(497,1560.5035,-1660.6595,28.5734,91.9275,0,1); // Police Maverick AddStaticVehicle(497,1562.3341,-1690.2146,28.5931,90.5969,0,1); // Police Maverick AddStaticVehicle(497,1562.3461,-1698.2717,28.5554,90.1832,0,1); // Police Maverick AddStaticVehicle(596,1602.4104,-1703.6111,5.6111,91.5477,0,1); // Police Car AddStaticVehicle(596,1602.3221,-1699.9736,5.6115,89.2099,0,1); // Police Car AddStaticVehicle(596,1602.1750,-1696.5577,5.6120,93.0273,0,1); // Police Car AddStaticVehicle(596,1601.8885,-1692.8848,5.6154,94.8282,0,1); // Police Car AddStaticVehicle(596,1601.6981,-1669.2485,5.6112,89.9893,0,1); // Police Car AddStaticVehicle(596,1601.8351,-1672.6240,5.6138,89.5551,0,1); // Police Car AddStaticVehicle(596,1601.7260,-1675.7190,5.6111,91.0178,0,1); // Police Car AddStaticVehicle(596,1601.6012,-1679.0245,5.6105,89.6192,0,1); // Police Car AddStaticVehicle(596,1601.5099,-1682.0374,5.6112,91.1087,0,1); // Police Car AddStaticVehicle(596,1601.6473,-1685.2968,5.6111,92.1126,0,1); // Police Car AddStaticVehicle(596,1602.1160,-1688.3842,5.6105,90.3806,0,1); // Police Car AddStaticVehicle(596,1602.3761,-1691.2947,5.6114,92.0310,0,1); // Police Car AddStaticVehicle(427,1558.4030,-1694.2920,6.0271,182.7780,0,1); // SAJ AddStaticVehicle(427,1562.0178,-1694.2340,6.0262,179.7962,0,1); // SAJ AddStaticVehicle(427,1565.5667,-1694.3372,6.0226,180.8615,0,1); // SAJ AddStaticVehicle(427,1569.0337,-1694.3256,6.0276,183.0553,0,1); // SAJ AddStaticVehicle(490,1528.7765,-1688.8204,6.0181,268.5767,0,0); // FBI Rancher AddStaticVehicle(490,1528.7687,-1684.8539,6.0178,264.9507,0,0); // FBI Rancher AddStaticVehicle(490,1528.9924,-1681.8429,6.0191,263.5582,0,0); // FBI Rancher AddStaticVehicle(490,1528.9354,-1675.9762,6.0186,268.0242,0,0); // FBI Rancher AddStaticVehicle(599,1547.2916,-1652.6005,6.0995,86.3748,0,1); // Police Rancher AddStaticVehicle(599,1547.0841,-1657.2292,6.0975,86.2265,0,1); // Police Rancher AddStaticVehicle(599,1546.9219,-1661.3966,6.0875,87.4288,0,1); // Police Rancher AddStaticVehicle(599,1546.7474,-1665.4281,6.0879,87.7218,0,1); // Police Rancher AddStaticVehicle(599,1546.7717,-1669.0321,6.0878,88.2158,0,1); // Police Rancher AddStaticVehicle(599,1546.6381,-1672.7745,6.0937,88.5943,0,1); // Police Rancher AddStaticVehicle(601,1547.9622,-1648.8424,5.8095,84.5175,1,1); // Swat AddStaticVehicle(601,1548.1078,-1645.3806,5.8095,85.8264,1,1); // Swat AddStaticVehicle(523,1583.7595,-1680.6028,5.4621,273.6710,0,0); // HPV AddStaticVehicle(523,1583.6768,-1678.6553,5.4653,268.8324,0,0); // HPV AddStaticVehicle(523,1583.5834,-1676.8381,5.4658,274.4072,0,0); // HPV AddStaticVehicle(523,1583.7841,-1675.1545,5.4591,272.6930,0,0); // HPV AddStaticVehicle(523,1583.7145,-1673.6825,5.4629,270.0845,0,0); // HPV AddStaticVehicle(523,1583.6553,-1672.3403,5.4627,274.0005,0,0); // HPV AddStaticVehicle(523,1583.5387,-1670.8330,5.4645,274.5410,0,0); // HPV AddStaticVehicle(523,1583.4729,-1669.3961,5.4592,273.8541,0,0); // HPV AddStaticVehicle(523,1583.4139,-1667.8948,5.4703,272.3056,0,0); // HPV for(new i = 0; i < MAX_VEHICLES; i++) { if(!IsValidVehicle(i)) continue; new rand = random(3000) + 1500; new string[24]; format(string, sizeof(string), "{D20000}BG-{FFFFFF}%d", rand); SetVehicleNumberPlate(i, string); } return 1; } public OnGameModeExit() { return true; } public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Molimo vas ukucajte vasu lozinku.","Login","Quit"); } else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registracija...",""COL_WHITE"Molimo vas ukucajte vasu lozinku koju cete koristiti.","Register","Quit"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)); INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]); INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]); INI_Close(File); return 1; } public OnPlayerRequestClass(playerid, classid) { return 1; } public OnPlayerRequestSpawn(playerid) { return true; } public OnPlayerSpawn(playerid) { new string[32]; format(string, sizeof(string), "Tvoje pare: $%i.", GetPlayerMoney(playerid)); SendClientMessage(playerid, 0xFFFFFFAA, string); SetPlayerHealth(playerid, 999999); SendClientMessage(playerid, 0xFF0000AA, "Zasticen si od SK-a za 15 sekundi."); SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid); } forward EndAntiSpawnKill(playerid); public EndAntiSpawnKill(playerid) { SetPlayerHealth(playerid, 100); SendClientMessage(playerid, 0xFF0000AA, "Nisi vise zasticen od SK-a."); if(GetPVarInt(playerid,"Lider") == 1 || GetPVarInt(playerid,"Clan") ) { SetPlayerPos(playerid, 288,1553.0703,1675.1847); SetPlayerInterior(playerid, 0); } return 1; } public OnPlayerDeath(playerid, killerid, reason) { return true; } public OnVehicleSpawn(vehicleid) { return true; } public OnVehicleDeath(vehicleid, killerid) { return true; } public OnPlayerText(playerid, text[]) { return true; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/pomoc", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 0xFF0000AA, DIALOG_STYLE_MSGBOX,"Komande:","Komande:/plati,/pomoc,/f","OK","Odbij"); return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return true; } public OnPlayerExitVehicle(playerid, vehicleid) { return true; } public OnPlayerStateChange(playerid, newstate, oldstate) { return true; } public OnPlayerEnterCheckpoint(playerid) { return true; } public OnPlayerLeaveCheckpoint(playerid) { return true; } public OnPlayerEnterRaceCheckpoint(playerid) { return true; } public OnPlayerLeaveRaceCheckpoint(playerid) { return true; } public OnRconCommand(cmd[]) { return true; } public OnObjectMoved(objectid) { return true; } public OnPlayerObjectMoved(playerid, objectid) { return true; } public OnPlayerPickUpPickup(playerid, pickupid) { return true; } public OnVehicleMod(playerid, vehicleid, componentid) { return true; } public OnEnterExitModShop(playerid, enterexit, interiorid) { return true; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return true; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return true; } public OnVehicleDamageStatusUpdate(vehicleid, playerid) { return true; } public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat) { return true; } public OnPlayerSelectedMenuRow(playerid, row) { return true; } public OnPlayerExitedMenu(playerid) { return true; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return true; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success ) { return 1; } public OnPlayerUpdate(playerid) { return true; } public OnPlayerStreamIn(playerid, forplayerid) { return true; } public OnPlayerStreamOut(playerid, forplayerid) { return true; } public OnVehicleStreamIn(vehicleid, forplayerid) { return true; } public OnVehicleStreamOut(vehicleid, forplayerid) { return true; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch( dialogid ) { case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_RED"Registracija...",""COL_RED"Ukucali ste pogresnu lozinku.\n"COL_WHITE"Ukucajte vasu lozinku kako bi ste se registrovali.","Register","Quit"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"Cash",1000); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_Close(File); SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_RED"Uspjesno!",""COL_RED"ste se registrovali","Ok",""); } } case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_RED"Uspjesno!",""COL_RED"ste se ulogovali u igru","Ok",""); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_RED"Prijava",""COL_RED"Vasa lozinka je netacna.\n"COL_RED"Ukucajte vasu lozinku.","Login","Quit"); } return 1; } } } return 1; } public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { return true; } public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid) { return true; } public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) { return true; } public OnPlayerClickTextDraw(playerid, Text:clickedid) { return true; } public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { return true; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return true; } public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ ) { return true; } forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { if(IsPlayerInRangeOfPoint(playerid, radi, x, y, z)) { return 1; } return 0; } forward Poruka(Boja, const string[]); public Poruka(Boja, const string[]) { foreach(Player, i) { if (GetPVarInt(i,"Lider") == 1 || GetPVarInt(i,"Clan") == 1) SendClientMessage(i, Boja, string); } return true; } 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("Kills",PlayerInfo[playerid][pKills]); INI_Int("Deaths",PlayerInfo[playerid][pDeaths]); return 1; } ///////////////////////////////////////////////komande//////////////////////////////////////////////////////// CMD:kick(playerid,params[]) { if(IsPlayerAdmin(playerid)) { new targetid, reason[128]; if(sscanf(params, "uS[128]", targetid, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Koristi: /kick [id] [razlog]"); new playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128]; if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,0xFF0000AA,"Igrac nije online"); GetPlayerName(targetid, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname)); format(string,sizeof(string),"Admin %s je kikovao %s | Razlog ( %s )",adminname,playername,reason); SendClientMessageToAll(0xFF0000AA,string); Kick(targetid); } else return SendClientMessage(playerid,0xFF0000AA,"Nemozes koristiti tu komandu!"); return 1; } CMD:plati(playerid, params[]) { new Target, Amount; if( !sscanf(params, "ui", Target, Amount) ) { if( Amount < 5 ) return SendClientMessage(playerid, 0xFF0000AA, "Minimalna Kolicina: 100"); if( Target == INVALID_PLAYER_ID ) return SendClientMessage(playerid, 0xFF0000AA, "Pogresan ID!"); if( Target == playerid ) return SendClientMessage(playerid, 0xFF0000AA, "Nemozes platiti sebi."); if( GetPlayerMoney(playerid) < Amount ) return SendClientMessage(playerid, 0xFF0000AA, "Nemas dovoljno para."); GivePlayerMoney(playerid, -Amount); GivePlayerMoney(Target, Amount); } else return SendClientMessage(playerid, 0xFF0000AA, "Koristi: /plati <ID> <pare>"); return 1; } CMD:daj(playerid, params[]) { new value; if(!IsPlayerAdmin(playerid)) return 0; if(sscanf(params, "d", value) != 0) SendClientMessage(playerid, 0xFF0000AA, "Koristi: /daj [Koliko Para]"); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GivePlayerMoney(i, value); } } return 1; } CMD:ban(playerid, params[]) { new id, reason[50], string[128], banned[MAX_PLAYER_NAME]; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA,"Nisi Owner ili admin lvl 3+"); if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Koristi: /ban [playerid] [razlog(optimalno)]"); GetPlayerName(id, banned, sizeof(banned)); format(string, sizeof(string), "BA:RP: %s je banovan od %s. razlog: %s", banned, GetName(playerid), reason); SendClientMessageToAll( 0xFF0000AA, string); BanEx(id, reason); return 1; } CMD:apm(playerid, params[]) { new str[128], str2[128], id; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA,"Nisi admin!"); if(sscanf(params, "us", id, str2)) return SendClientMessage(playerid, 0xFF0000AA, "Koristenje: /apm [ID] [Text]"); format(str, sizeof(str), "Poslao si PM {FF0000}%s[ID: %d]{FF0000}! Text: {FF0000}%s", GetName(id), id, str2); SendClientMessage(playerid, -1, str); format(str, sizeof(str), "{FF0000v}Admin %s(ID %d): {FF0000}%s", GetName(playerid), playerid, str2); SendClientMessage(id, 0xFF0000AA, str); return 1; }