Hali. Elkezdtem írni egy Modot, de amikor indítanám Script[gamemodes/test.amx]: Run time error 19: \"File or function is not found\"
Mi lehet a baj? Incek is benn vannak, pluginok is..
echo Executing Server Config...
lanmode 0
rcon_password eztitokxD
maxplayers 50
port 7777
hostname Test Server Tyler
gamemode0 test 1
filterscripts
plugins streamer sscanf
announce 0
query 1
chatlogging 0
weburl Keszuloben!
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <Dini>
forward Nevekki(playerid);
new File[128];
new PW[64];
new WPW[MAX_PLAYERS];
new Beloggolt[MAX_PLAYERS];
enum pAdat
{
pAdmin,
pMoney,
pSkin,
pOra,
pPerc,
pMPerc,
pFrakcio,
pMellekFrakcio,
pMunka,
pMunka2,
pBanned,
pNem,
pKor,
pHaz,
pANev[MAX_PLAYER_NAME],
Float:pArmor,
Float:spawnx,
Float:spawny,
Float:spawnz,
spawnint,
pAs,
pSs
};
new pInfo[MAX_PLAYERS][pAdat];
main()
{
print(\"\\n----------------------------------\");
print(\" SA-MP 0.1 By: Tyler\");
print(\"----------------------------------\\n\");
}
public OnGameModeInit()
{
SetGameModeText(\"Test 0.1\");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
Nevekki(playerid);
format(File, sizeof(File), \"Jatekosok/%s.ini\", Nev(playerid));
if(!fexist(File))
{
Nulla(playerid);
Ment(playerid);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, \"Regisztráció\", \"Írj be egy tetszõleges jelszót!\", \"Oké\", \"Mégse\");
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, \"Belépés\", \"Írd be a jelszavad!\", \"Rendben\", \"Mégse\");
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
Nevekki(playerid);
if(Beloggolt[playerid] == 1)
{
Ment(playerid);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
Nevekki(playerid);
Betolt(playerid);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/mycommand\", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
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[])
{
if(dialogid == 1)
{
if(!response) Kick(playerid);
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, \"Regisztráció\", \"Írj be egy tetszõleges jelszót!\", \"Rendben\", \"Mégsem\");
return 0;
}
format(File, sizeof(File), \"Jatekosok/%s.ini\", Nev(playerid));
if(!fexist(File))
{
dini_Create(File);
dini_Set(File, \"Jelszó\", inputtext);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, \"Belépés\", \"Írd be a jelszavad.\", \"Rendben\", \"Mégsem\");
}
}
if(dialogid == 2)
{
format(File, sizeof(File), \"Jatekosok/%s.ini\", Nev(playerid));
if(!response)
{
Kick(playerid);
}
format(PW, 64, \"%s\", dini_Get(File, \"Jelszó\"));
if(!strcmp(inputtext, PW, false))
{
SendClientMessage(playerid, -1, \"Sikeres belépés!\");
SpawnPlayer(playerid);
Beloggolt[playerid] = 1;
}
else
{
WPW[playerid] ++;
SendClientMessage(playerid, -1, \"Rossz jelszó!\");
if(WPW[playerid] == 3)
{
Kick(playerid);
}
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, \"Belépés\", \"Írd be a jelszavad\", \"Oké\", \"Mégse\");
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
public Nevekki(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
return 1;
}
stock Nev(playerid)
{
new Neve[MAX_PLAYER_NAME];
GetPlayerName(playerid, Neve, sizeof(Neve));
return Neve;
}
stock Ment(playerid)
{
pInfo[ playerid ][ spawnint ] = GetPlayerInterior(playerid);
format(File, sizeof(File), \"Jatekos/%s.ini\", SimaNev(playerid));
if(dini_Exists(File))
{
dini_IntSet(File, \"Admin\", pInfo[playerid][pAdmin]);
dini_IntSet(File, \"AdminSegéd\", pInfo[playerid][pAs]);
dini_IntSet(File, \"ScripterSegéd\", pInfo[playerid][pSs]);
dini_IntSet(File, \"Pénz\", pInfo[playerid][pMoney]);
dini_IntSet(File, \"Skin\", pInfo[playerid][pSkin]);
dini_IntSet(File, \"Frakció\", pInfo[playerid][pFrakcio]);
dini_IntSet(File, \"MellékFrakció\", pInfo[playerid][pMellekFrakcio]);
dini_IntSet(File, \"Munka\", pInfo[playerid][pMunka]);
dini_IntSet(File, \"Munka2\", pInfo[playerid][pMunka2]);
dini_IntSet(File, \"Bann\", pInfo[playerid][pBanned]);
dini_IntSet(File, \"Kor\", pInfo[playerid][pKor]);
dini_IntSet(File, \"Nem\", pInfo[playerid][pNem]);
dini_IntSet(File, \"Ház\", pInfo[playerid][pHaz]);
dini_IntSet(File, \"JÓra\", pInfo[playerid][pOra]);
dini_IntSet(File, \"JPerc\", pInfo[playerid][pPerc]);
dini_IntSet(File, \"JMPerc\", pInfo[playerid][pMPerc]);
dini_Set(File, \"ANév\", pInfo[playerid][pANev]);
dini_FloatSet(File, \"pArmor\", pInfo[playerid][pArmor]);
dini_FloatSet(File, \"spawnx\", pInfo[playerid][spawnx]);
dini_FloatSet(File, \"spawny\", pInfo[playerid][spawny]);
dini_FloatSet(File, \"spawnz\", pInfo[playerid][spawnz]);
dini_IntSet(File, \"spawnint\", pInfo[playerid][spawnint]);
}
}
stock Betolt(playerid)
{
format(File, sizeof(File), \"Jatekos/%s.ini\", SimaNev(playerid));
if(dini_Exists(File))
{
pInfo[playerid][pAdmin] = dini_Int(File, \"Admin\");
pInfo[playerid][pAs] = dini_Int(File, \"AdminSegéd\");
pInfo[playerid][pSs] = dini_Int(File, \"ScripterSegéd\");
pInfo[playerid][pMoney] = dini_Int(File, \"Pénz\");
pInfo[playerid][pSkin] = dini_Int(File, \"Skin\"), SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
pInfo[playerid][pFrakcio] = dini_Int(File, \"Frakció\");
pInfo[playerid][pMellekFrakcio] = dini_Int(File, \"MellékFrakció\");
pInfo[playerid][pMunka] = dini_Int(File, \"Munka\");
pInfo[playerid][pMunka2] = dini_Int(File, \"Munka2\");
pInfo[playerid][pBanned] = dini_Int(File, \"Bann\");
pInfo[playerid][pKor] = dini_Int(File, \"Kor\");
pInfo[playerid][pNem] = dini_Int(File, \"Nem\");
pInfo[playerid][pHaz] = dini_Int(File, \"Ház\");
pInfo[playerid][pOra] = dini_Int(File, \"JÓra\"), SetPlayerScore(playerid, pInfo[playerid][pOra]);
pInfo[playerid][pPerc] = dini_Int(File, \"JPerc\");
pInfo[playerid][pMPerc] = dini_Int(File, \"JMPerc\");
format(pInfo[playerid][pANev], MAX_PLAYER_NAME, \"%s\", dini_Get(File, \"ANév\"));
pInfo[playerid][pArmor] = dini_Float(File, \"pArmor\");
pInfo[playerid][spawnx] = dini_Float(File, \"spawnx\");
pInfo[playerid][spawny] = dini_Float(File, \"spawny\");
pInfo[playerid][spawnz] = dini_Float(File, \"spawnz\");
pInfo[playerid][spawnint] = dini_Int(File, \"spawnint\");
}
}
stock Nulla(playerid)
{
pInfo[playerid][pAdmin] = 0;
pInfo[playerid][pAs] = 0;
pInfo[playerid][pSs] = 0;
pInfo[playerid][pMoney] = 0;
pInfo[playerid][pSkin] = 0;
pInfo[playerid][pFrakcio] = 0;
pInfo[playerid][pMellekFrakcio] = 0;
pInfo[playerid][pMunka] = 0;
pInfo[playerid][pMunka2] = 0;
pInfo[playerid][pBanned] = 0;
pInfo[playerid][pKor] = 0;
pInfo[playerid][pNem] = 0;
pInfo[playerid][pHaz] = 0;
pInfo[playerid][pOra] = 0;
pInfo[playerid][pPerc] = 0;
pInfo[playerid][pMPerc] = 0;
pInfo[playerid][pArmor] = 0;
pInfo[playerid][spawnx] = 0;
pInfo[playerid][spawny] = 0;
pInfo[playerid][spawnz] = 0;
pInfo[playerid][spawnint] = 0;
pInfo[playerid][spawnz] = 0;
pInfo[playerid][pAs] = 0;
Beloggolt[playerid] = 0;
}
stock SimaNev(playerid)
{
new Role_Play_Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Role_Play_Name, sizeof(Role_Play_Name));
return Role_Play_Name;
}