---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, ©2005-2015 SA-MP Team [16:57:03] [16:57:03] Server Plugins [16:57:03] -------------- [16:57:03] Loading plugin: crashdetect.so [16:57:03] CrashDetect v4.15.1 is OK. [16:57:03] Loaded. [16:57:03] Loading plugin: sscanf.so [16:57:03] [16:57:03] =============================== [16:57:03] sscanf plugin loaded. [16:57:03] Version: 2.8.2 [16:57:03] © 2012 Alex "******" Cole [16:57:03] =============================== [16:57:03] Loaded. [16:57:03] Loading plugin: streamer.so [16:57:03] *** Streamer Plugin v2.8.2 by Incognito loaded *** [16:57:03] Loaded. [16:57:03] Loading plugin: MapAndreas.so [16:57:03] Loaded. [16:57:03] Loading plugin: Whirlpool.so [16:57:03] [16:57:03] ================== [16:57:03] [16:57:03] Whirlpool loaded [16:57:03] [16:57:03] ================== [16:57:03] [16:57:03] Loaded. [16:57:03] Loaded 5 plugins. [16:57:03] [16:57:03] Filterscripts [16:57:03] --------------- [16:57:03] Loading filterscript 'UltraHost.amx'... [16:57:03] Loaded 1 filterscripts. [16:57:03] [16:57:03] [16:57:03] [16:57:03] ======================================= [16:57:03] | | [16:57:03] | YSI version 3.09.0684 | [16:57:03] | By Alex "******" Cole | [16:57:03] | | [16:57:03] ======================================= [16:57:03] [16:57:03] [16:57:03] [16:57:03] --------------------------------- [16:57:03] Fucking DM Server By banana_ghost [16:57:03] --------------------------------- [16:57:03] MapAndreas: plugin could not init! [16:57:03] MapAndreas: check files and make sure you have enough memory! [16:57:03] MapAndreas: plugin could not init! [16:57:03] MapAndreas: check files and make sure you have enough memory! [16:57:03] Loaded 3 vehicles from: vehicles/trains.txt [16:57:03] Loaded 3 vehicles from: vehicles/pilots.txt [16:57:03] Loaded 15 vehicles from: vehicles/lv_law.txt [16:57:03] Loaded 39 vehicles from: vehicles/lv_airport.txt [16:57:03] Loaded 255 vehicles from: vehicles/lv_gen.txt [16:57:03] Loaded 38 vehicles from: vehicles/sf_law.txt [16:57:03] Loaded 35 vehicles from: vehicles/sf_airport.txt [16:57:03] Loaded 353 vehicles from: vehicles/sf_gen.txt [16:57:03] Loaded 24 vehicles from: vehicles/ls_law.txt [16:57:03] Loaded 37 vehicles from: vehicles/ls_airport.txt [16:57:03] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt [16:57:03] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt [16:57:03] Loaded 71 vehicles from: vehicles/whetstone.txt [16:57:03] Loaded 168 vehicles from: vehicles/bone.txt [16:57:03] Loaded 61 vehicles from: vehicles/flint.txt [16:57:03] Loaded 96 vehicles from: vehicles/tierra.txt [16:57:03] Loaded 96 vehicles from: vehicles/red_county.txt [16:57:03] Total vehicles from files: 1781 [16:57:03] --------------------------------- [16:57:03] Fucking DM Server By maldo [16:57:03] --------------------------------- [16:57:03] Number of vehicle models: 173 |
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, ©2005-2015 SA-MP Team [16:57:03] [16:57:03] Server Plugins [16:57:03] -------------- [16:57:03] Loading plugin: crashdetect.so [16:57:03] CrashDetect v4.15.1 is OK. [16:57:03] Loaded. [16:57:03] Loading plugin: sscanf.so [16:57:03] [16:57:03] =============================== [16:57:03] sscanf plugin loaded. [16:57:03] Version: 2.8.2 [16:57:03] © 2012 Alex "******" Cole [16:57:03] =============================== [16:57:03] Loaded. [16:57:03] Loading plugin: streamer.so [16:57:03] *** Streamer Plugin v2.8.2 by Incognito loaded *** [16:57:03] Loaded. [16:57:03] Loading plugin: MapAndreas.so [16:57:03] Loaded. [16:57:03] Loading plugin: Whirlpool.so [16:57:03] [16:57:03] ================== [16:57:03] [16:57:03] Whirlpool loaded [16:57:03] [16:57:03] ================== [16:57:03] [16:57:03] Loaded. [16:57:03] Loaded 5 plugins. [16:57:03] [16:57:03] Filterscripts [16:57:03] --------------- [16:57:03] Loading filterscript 'UltraHost.amx'... [16:57:03] Loaded 1 filterscripts. [16:57:03] [16:57:03] [16:57:03] [16:57:03] ======================================= [16:57:03] | | [16:57:03] | YSI version 3.09.0684 | [16:57:03] | By Alex "******" Cole | [16:57:03] | | [16:57:03] ======================================= [16:57:03] [16:57:03] [16:57:03] [16:57:03] --------------------------------- [16:57:03] Fucking DM Server By banana_ghost [16:57:03] --------------------------------- [16:57:03] MapAndreas: plugin could not init! [16:57:03] MapAndreas: check files and make sure you have enough memory! [16:57:03] MapAndreas: plugin could not init! [16:57:03] MapAndreas: check files and make sure you have enough memory! [16:57:03] Loaded 3 vehicles from: vehicles/trains.txt [16:57:03] Loaded 3 vehicles from: vehicles/pilots.txt [16:57:03] Loaded 15 vehicles from: vehicles/lv_law.txt [16:57:03] Loaded 39 vehicles from: vehicles/lv_airport.txt [16:57:03] Loaded 255 vehicles from: vehicles/lv_gen.txt [16:57:03] Loaded 38 vehicles from: vehicles/sf_law.txt [16:57:03] Loaded 35 vehicles from: vehicles/sf_airport.txt [16:57:03] Loaded 353 vehicles from: vehicles/sf_gen.txt [16:57:03] Loaded 24 vehicles from: vehicles/ls_law.txt [16:57:03] Loaded 37 vehicles from: vehicles/ls_airport.txt [16:57:03] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt [16:57:03] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt [16:57:03] Loaded 71 vehicles from: vehicles/whetstone.txt [16:57:03] Loaded 168 vehicles from: vehicles/bone.txt [16:57:03] Loaded 61 vehicles from: vehicles/flint.txt [16:57:03] Loaded 96 vehicles from: vehicles/tierra.txt [16:57:03] Loaded 96 vehicles from: vehicles/red_county.txt [16:57:03] Total vehicles from files: 1781 [16:57:03] --------------------------------- [16:57:03] Fucking DM Server By banana_ghost [16:57:03] --------------------------------- [16:57:03] Number of vehicle models: 173 [16:59:09] [connection] 217.24.250.130:59710 requests connection cookie. [16:59:10] [connection] incoming connection: 217.24.250.130:59710 id: 0 [16:59:10] [join] ShadyELF has joined the server (0:217.24.250.130) [16:59:35] [connection] 79.106.6.240:1070 requests connection cookie. [16:59:36] [connection] incoming connection: 79.106.6.240:1070 id: 1 [16:59:37] [join] Game has joined the server (1:79.106.6.240) [16:59:41] RCON (In-Game): Player #0 (ShadyELF) failed login. [16:59:47] RCON (In-Game): Player #0 (ShadyELF) has logged in. [16:59:49] [chat] [Game]: so ? [16:59:51] [chat] [ShadyELF]: dude [16:59:53] [chat] [ShadyELF]: listen me [17:00:00] [chat] [Game]: yeah [17:00:03] [chat] [ShadyELF]: im working on this server and .. got some lag [17:00:12] [chat] [Game]: yeah i saw [17:00:12] [chat] [ShadyELF]: when i try to admin you server going offline [17:00:16] [chat] [ShadyELF]: .. but dont worry [17:00:19] [chat] [ShadyELF]: ill fix it soon [17:00:41] [kill] Game killed ShadyELF UZI [17:00:42] [chat] [ShadyELF]: gg [17:00:51] [chat] [Game]: td its not working [17:00:51] [chat] [Game]: td its not working [17:00:54] [chat] [ShadyELF]: yes [17:00:56] [chat] [ShadyELF]: ill fix it [17:00:58] [kill] ShadyELF killed Game Sawn-off Shotgun [17:01:03] [chat] [ShadyELF]: this server will be the best soon [17:01:13] [kill] Game killed ShadyELF UZI [17:01:20] [chat] [ShadyELF]: ive post right now for the problem in samp forum.. [17:01:28] [chat] [ShadyELF]: im waiting to fix the bug |
CMD:aduty(playerid, params[]) { if(LoginCheck[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE""); if(pInfo[playerid][AdminLevel] < 1) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE""); else if(aduty[playerid] == 0) { //Saving Stuff Before Going On Admin Duty aduty[playerid] =1; offduty[playerid] =0; GetPlayerHealth(playerid, ahealth[playerid]); GetPlayerArmour(playerid, aarmor[playerid]); aInter[playerid] = GetPlayerInterior(playerid); aWorld[playerid] = GetPlayerVirtualWorld(playerid); GetPlayerPos(playerid,aX[playerid],aY[playerid],aZ[playerid]); SpawnPlayer(playerid); AdminMsg(playerid,"aduty (On Duty)"); } else { aduty[playerid] =0; offduty[playerid] =1; aInter[playerid] = GetPlayerInterior(playerid); aWorld[playerid] = GetPlayerVirtualWorld(playerid); GetPlayerPos(playerid,aX[playerid],aY[playerid],aZ[playerid]); SpawnPlayer(playerid); AdminMsg(playerid,"aduty (Off Duty)"); } return 1; } |
plugins crashdetect.so sscanf.so streamer.so MapAndreas.so Whirlpool.so nativechecker.so |
stock AdminMsg(playerid, cmdused[]) { new str1[128]; format(str1,sizeof(str1),"Admin %s (%d) Issued Command /%s.",pname(playerid),playerid,cmdused); Admin(str1); foreach(new i : Player) { if(pInfo[playerid][AdminLevel] >= 1) { if(pInfo[playerid][AdminLevel] <= 5) { if(pInfo[i][AdminLevel] >= 1) { if(LoginCheck[i] == 1) { SendClientMessage(i,COLOR_HOTPINK,str1); } } } } } return 1; } |
//Includes #include <a_samp> #include <sscanf2> #include <izcmd> #include <dini> #include <streamer> #include <foreach> #include <YSI\y_ini> #include <YSI\y_master> #include <mSelection> #include <mapandreas> #include "../include/gl_common.inc" |
stock Admin(string[]) { new entry[200]; format(entry, sizeof(entry), "%s\r\n",string); new File:hFile; hFile = fopen("ServerInfo/log.log", io_append); fwrite(hFile, entry); fclose(hFile); } |
stock AdminMsg(playerid, cmdused[])
{
new str1[128];
format(str1,sizeof(str1),"Admin %s (%d) Issued Command /%s.",pname(playerid),playerid,cmdused);
Admin(str1);
foreach(new i : Player)
{
if(pInfo[playerid][AdminLevel] >= 1 && LoginCheck[i] == 1) SendClientMessage(i,COLOR_HOTPINK,str1);
}
return 1;
}
Admin(const string[])
{
new File: hFile = fopen("ServerInfo/log.log", io_append);
if (!hFile) return; // invalid handle, don't proceed
fwrite(hFile, string);
fwrite(hFile, "\r\n");
fclose(hFile);
}
Try this
PHP Code:
|
Returning any value inside a loop breaks, thus won't be sent to the rest of the admins. Creating a string inside a loop is also bad.
|
Try this
PHP Code:
also, create folder ServerInfo in scriptfiles if not exists, server won't create it MapAndreas plugin isn't loading successfully |