Wo Ist der fehler?
Fehlermeldung:
C:\Users\Marvin\Desktop\Nemesus's Tutorial Gamemode 0.3e\Nemesus's Tutorial Gamemode\pawno\include\incognitostreamer.inc(155) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
C:\Users\Marvin\Desktop\Nemesus's Tutorial Gamemode 0.3e\Nemesus's Tutorial Gamemode\pawno\include\incognitostreamer.inc(375) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditObject")
C:\Users\Marvin\Desktop\Nemesus's Tutorial Gamemode 0.3e\Nemesus's Tutorial Gamemode\pawno\include\incognitostreamer.inc(397) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectObject")
C:\Users\Marvin\Desktop\Nemesus's Tutorial Gamemode 0.3e\Nemesus's Tutorial Gamemode\pawno\include\incognitostreamer.inc(399) : error 017: undefined symbol "SELECT_OBJECT_PLAYER_OBJECT"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
//Includes
#include <a_samp>
#include <Dini>
#include <incognitostreamer>
#include <MD5>
#include <a_http>
//Farben
#define Gelb 0xFFFF00FF
#define Rot 0xFF2800FF
#define Blau 0x000FFFFF
#define Weiß 0xFEFEFEFF
//Dialoge
#define REGISTER 1
#define LOGIN 2
#define STATS 3
//Define
#define sFraktion "LSPD"
#define sFraktion2 "FBI"
#define sFratkion3 "Bundeswehr"
#define Version "0.1"
//DCMD
#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
//Enums
enum SpielerDaten
{
Adminlevel,
Level,
Fraktion,
Team,
sLogin
};
new sSpieler[MAX_PLAYERS][SpielerDaten];
//Tore
new bsntor;
//Fahzeuge
new lspdcars[1];
main()
{
print("----------------------------------");
print(" MarvinJoke");
print(" MarvinJoke");
print(" MarvinJoke");
print(" Copyright 2013");
print("----------------------------------");
}
public OnGameModeInit()
{
//Updatecheck
HTTP(1,HTTP_GET,"www.nemesus-Scripts.de/Updates/tutorialscript.txt","","Updatecheck");
SetGameModeText("German Roleplay MJ");
DisableInteriorEnterExits();
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
//Objecte
bsntor = CreateDynamicObject(969, 1194.2557373047, -941.72430419922, 41.753002166748, 0, 0, 100); //Gate beim BSN
//Fahrzeuge
lspdcars[0]= CreateDynamicObject(596,1535.8518,-1671.9904,13.3828,180.7820,1,6,60000); //Polizei Fahrzeug
//Timers
SetTimer("Nachrichten",300000,true);
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)
{
//NPC/Bot Abfrage
if(IsPlayerNPC(playerid)) return 1;
new Spieler[64];
new Sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Sname,sizeof(Sname));
format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
if(dini_Exists(Spieler))
{
SendClientMessage(playerid,Blau,"Herzlich Willkommen auf dem Reallife Server von ???");
ShowPlayerDialog(playerid,LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde in unserer Datenbank gefunden, bitte gebe nun dein Passwort ein und logge dich somit ein.","Login","Abbrechen");
return 1;
}
else
{
SendClientMessage(playerid,Blau,"Herzlich Willkommen auf dem Reallife Server von ???!");
ShowPlayerDialog(playerid,REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Bitte wähle ein Passwort um dir einen Account zu erstellen!","Registrieren","Abbrechen");
return 1;
}
}
public OnPlayerDisconnect(playerid, reason)
{
//NPC/Bot Abfrage
if(IsPlayerNPC(playerid)) return 1;
sSpieler[playerid][sLogin] = 0;
SpielerSpeichern(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
//NPC/Bot Abfrage
if(IsPlayerNPC(playerid)) return 1;
//Fraktionsabfrage
//Zivispawn
if(IstSpielerInFraktion(playerid, 0))
{
SetPlayerPos(playerid, 1481.0518,-1757.0570,17.5313);
SetPlayerColor(playerid,Weiß);
return 1;
}
//LSPD Spawn
if(IstSpielerInFraktion(playerid, 1))
{
SetPlayerPos(playerid, 1539.8313,-1620.5837,13.5469);
SetPlayerColor(playerid,Blau);
SendClientMessage(playerid,Blau,"Du bist als LSPD gespawnt!");
GivePlayerWeapon(playerid,31,500);
return 1;
}
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[])
{
//Befehle mit DCMD
dcmd(makeadmin, 9, cmdtext);
dcmd(makeleader, 10, cmdtext);
if (strcmp("/credits", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,Blau,"Dieses Tutorial Gamemode wurde von Nemesus-Scripts.de erstellt!");
SendClientMessage(playerid,Blau,"Checkout Nemesus-Scripts.de");
return 1;
}
if (strcmp("/stats", cmdtext, true, 10) == 0)
{
new string[128];
new ftext[20];
new level = sSpieler[playerid][Fraktion];
if(level == 0) { ftext= "Zivilist"; }
else if(level == 1) { ftext= "LSPD"; }
format(string,sizeof(string),"Dein Level %d\nDein Geld %d\nDeine Fraktion %s",sSpieler[playerid][Level],GetPlayerMoney(playerid),ftext);
ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Deine Statistik",string,"OK","OK");
return 1;
}
if (strcmp("/bsn", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1218.4890,-919.5051,43.0938);
SendClientMessage(playerid,Blau,"Du hast dich zum BSN teleportiert!");
return 1;
}
if (strcmp("/gmx", cmdtext, true, 10) == 0)
{
if(IstSpielerAdmin(playerid, 3))
{
SendRconCommand("gmx");
}
else
{
SendClientMessage(playerid,Rot,"Du bist kein Administrator!");
return 1;
}
return 1;
}
if (strcmp("/binichadmin", cmdtext , true, 10) == 0)
{
if(sSpieler[playerid][Adminlevel] >= 1)
{
SendClientMessage(playerid,Gelb,"Du bist ein Administrator!");
return 1;
}
else
{
SendClientMessage(playerid,Rot,"Du bist kein Administrator!");
return 1;
}
}
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
if(IstSpielerInFraktion(playerid, 1))
{
if(IsPlayerInRangeOfPoint(playerid,5,1194.2557373047, -941.72430419922, 41.753002166748))
{
SendClientMessage(playerid,Gelb,"Das Tor hat sich geöfffnet es würd automatisch in 10 Sekunden schließen!");
MoveDynamicObject(bsntor,1194.2557373047, -941.72430419922, 31.753002166748,2.0);
SetTimer("torbsn", 10125, 0);
return 1;
}
else
{
SendClientMessage(playerid,Rot,"Du bist nicht in der Fraktion (1) LSPD!");
return 1;
}
}
}
return 0;
}
//DCMD Befehle
//Makeleader Befehl
dcmd_makeleader(playerid,params[])
{
new pid, frakid;
if(sscanf(params,"ud",pid,frakid))
{
return SendClientMessage(playerid,Gelb,"Verwendung : /makleader [ID] [Fraktions ID]");
}
if(frakid > 6)
{
return SendClientMessage(playerid,Rot,"Soviele Fraktionen gibt es nicht!");
}
if(IstSpielerAdmin(playerid, 3))
{
if(pid == INVALID_PLAYER_ID)
{
return SendClientMessage(playerid,Rot,"Ungültiger Spieler!");
}
if(IstSpielerInFraktion(pid,frakid) == frakid)
{
return SendClientMessage(playerid,Rot,"Der angegebene Spieler ist schon in dieser Fraktion!");
}
else
{
sSpieler[pid][Fraktion] = frakid;
SendClientMessage(pid,Gelb,"Du bist nun in einer Fraktion!");
SendClientMessage(playerid,Gelb,"Du hast den angegeben Spieler in eine Fraktion gepackt!");
}
}
else
{
return SendClientMessage(playerid,Rot,"Du bist kein Administrator!");
}
return 1;
}
//Makeadmin Befehl
dcmd_makeadmin(playerid, params[])
{
new pid,level;
if(sscanf(params,"ud", pid, level))
{
return SendClientMessage(playerid, Gelb,"Verwendung : /makeadmin [ID] [Level]");
}
if(IstSpielerAdmin(playerid, 5))
{
if(pid == INVALID_PLAYER_ID)
{
return SendClientMessage(playerid,Rot,"Ungültiger Spieler!");
}
if(IstSpielerAdmin(pid,level) == level)
{
return SendClientMessage(playerid, Rot,"Der Spieler hat schon das angegebene Adminlevel!");
}
else
{
sSpieler[pid][Adminlevel] = level;
SendClientMessage(pid, Gelb, "Du bist nun ein Administrator!");
SendClientMessage(playerid,Gelb,"Du hast den angegeben Spieler zum Administrator gemacht!");
}
}
else
{
return SendClientMessage(playerid,Rot,"Du bist kein Administrator!");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i = 0; i<sizeof(lspdcars); i++)
{
if(GetPlayerVehicleID(playerid) == lspdcars[i])
{
if(IstSpielerInFraktion(playerid, 1))
{
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,Rot,"Du bist kein Mitglied des LSPDs!");
}
}
}
}
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 == STATS)
{
if(response == 0)
{
return 1;
}
if(response == 1)
{
return 1;
}
}
if(dialogid == LOGIN)
{
if(response == 0)
{
SendClientMessage(playerid,Rot,"Du hast den Authenfizierungs Prozess abgebrochen . . .");
Kick(playerid);
return 1;
}
if(response == 1)
{
Login(playerid,MD5_Hash(inputtext));
return 1;
}
}
if(dialogid == REGISTER)
{
if(response == 0)
{
SendClientMessage(playerid,Blau,"Du hast den Registrierungs Vorgang abgebrochen");
Kick(playerid);
return 1;
}
if(response == 1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,Blau,"Bitte gebe ein Passwort ein");
ShowPlayerDialog(playerid,REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Bitte wähle ein Passwort um dir einen Account zu erstellen!","Registrieren","Abbrechen");
return 1;
}
Register(playerid,inputtext);
return 1;
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
stock Register(playerid,key[])
{
new Spieler[64];
new Sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Sname,sizeof(Sname));
format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
SpielerReset(playerid);
dini_Create(Spieler);
dini_Set(Spieler,"Passwort",key);
dini_IntSet(Spieler,"Adminlevel",0);
dini_IntSet(Spieler,"Level",0);
dini_IntSet(Spieler,"Fraktion",0);
dini_IntSet(Spieler,"Team",0);
SendClientMessage(playerid,Blau,"Du hast dich erfolgreich registriert");
SpawnPlayer(playerid);
return 1;
}
stock Login(playerid,key[])
{
new Spieler[64];
new Sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Sname,sizeof(Sname));
format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
if(!strcmp(key,dini_Get(Spieler,"Passwort"),false))
{
SendClientMessage(playerid,Blau,"Login erfolgreich . . . Spielerdaten werden geladen!");
SpielerLaden(playerid);
return 1;
}
else
{
SendClientMessage(playerid,Blau,"Das eingebene Passwort ist inkorrekt!");
ShowPlayerDialog(playerid,LOGIN,DIALOG_STYLE_INPUT,"Login","{FEFEFE}Dein {FF9600}Account {FEFEFE}wurde in unserer Datenbank gefunden, bitte gebe nun dein Passwort ein und logge dich somit ein.","Login","Abbrechen");
return 1;
}
}
stock SpielerSpeichern(playerid)
{
new Spieler[64];
new Sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Sname,sizeof(Sname));
format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
if(dini_Exists(Spieler))
{
dini_IntSet(Spieler,"Adminlevel",sSpieler[playerid][Adminlevel]);
dini_IntSet(Spieler,"Level",sSpieler[playerid][Level]);
dini_IntSet(Spieler,"Fraktion",sSpieler[playerid][Fraktion]);
dini_IntSet(Spieler,"Team",sSpieler[playerid][Team]);
}
return 1;
}
stock SpielerLaden(playerid)
{
new Spieler[64];
new Sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Sname,sizeof(Sname));
format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
if(dini_Exists(Spieler))
{
SetPlayerScore(playerid,dini_Int(Spieler,"Level"));
sSpieler[playerid][Adminlevel] = dini_Int(Spieler,"Adminlevel");
sSpieler[playerid][Level] = dini_Int(Spieler,"Level");
sSpieler[playerid][Fraktion] = dini_Int(Spieler,"Fraktion");
sSpieler[playerid][Team] = dini_Int(Spieler,"Team");
sSpieler[playerid][sLogin] = 1;
SpawnPlayer(playerid);
}
return 1;
}
stock SpielerReset(playerid)
{
sSpieler[playerid][Adminlevel] = 0;
sSpieler[playerid][Level] = 0;
sSpieler[playerid][Fraktion] = 0;
sSpieler[playerid][Team] = 0;
return 1;
}
//Adminsystem
stock IstSpielerAdmin(playerid,level)
{
if(sSpieler[playerid][Adminlevel] >= level) return 1;
return 0;
}
//Fraktion
stock IstSpielerInFraktion(playerid, fraktionsid)
{
if(sSpieler[playerid][Fraktion] == fraktionsid) return 1;
return 0;
}
//Login
stock IstSpielerLogged(playerid)
{
if(sSpieler[playerid][sLogin] == 1) return 1;
return 0;
}
//Sscanf
stock sscanf(string[], format[], {Float,_}:...)
{
#if defined isnull
if (isnull(string))
#else
if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
#endif
{
return format[0];
}
#pragma tabsize 4
new
formatPos = 0,
stringPos = 0,
paramPos = 2,
paramCount = numargs(),
delim = ' ';
while (string[stringPos] && string[stringPos] <= ' ')
{
stringPos++;
}
while (paramPos < paramCount && string[stringPos])
{
switch (format[formatPos++])
{
case '\0':
{
return 0;
}
case 'i', 'd':
{
new
neg = 1,
num = 0,
ch = string[stringPos];
if (ch == '-')
{
neg = -1;
ch = string[++stringPos];
}
do
{
stringPos++;
if ('0' <= ch <= '9')
{
num = (num * 10) + (ch - '0');
}
else
{
return -1;
}
}
while ((ch = string[stringPos]) > ' ' && ch != delim);
setarg(paramPos, 0, num * neg);
}
case 'h', 'x':
{
new
num = 0,
ch = string[stringPos];
do
{
stringPos++;
switch (ch)
{
case 'x', 'X':
{
num = 0;
continue;
}
case '0' .. '9':
{
num = (num << 4) | (ch - '0');
}
case 'a' .. 'f':
{
num = (num << 4) | (ch - ('a' - 10));
}
case 'A' .. 'F':
{
num = (num << 4) | (ch - ('A' - 10));
}
default:
{
return -1;
}
}
}
while ((ch = string[stringPos]) > ' ' && ch != delim);
setarg(paramPos, 0, num);
}
case 'c':
{
setarg(paramPos, 0, string[stringPos++]);
}
case 'f':
{
new changestr[16], changepos = 0, strpos = stringPos;
while(changepos < 16 && string[strpos] && string[strpos] != delim)
{
changestr[changepos++] = string[strpos++];
}
changestr[changepos] = '\0';
setarg(paramPos,0,_:floatstr(changestr));
}
case 'p':
{
delim = format[formatPos++];
continue;
}
case '\'':
{
new
end = formatPos - 1,
ch;
while ((ch = format[++end]) && ch != '\'') {}
if (!ch)
{
return -1;
}
format[end] = '\0';
if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
{
if (format[end + 1])
{
return -1;
}
return 0;
}
format[end] = '\'';
stringPos = ch + (end - formatPos);
formatPos = end + 1;
}
case 'u':
{
new
end = stringPos - 1,
id = 0,
bool:num = true,
ch;
while ((ch = string[++end]) && ch != delim)
{
if (num)
{
if ('0' <= ch <= '9')
{
id = (id * 10) + (ch - '0');
}
else
{
num = false;
}
}
}
if (num && IsPlayerConnected(id))
{
setarg(paramPos, 0, id);
}
else
{
#if !defined foreach
#define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
#define __SSCANF_FOREACH__
#endif
string[end] = '\0';
num = false;
new
name[MAX_PLAYER_NAME];
id = end - stringPos;
foreach (Player, playerid)
{
GetPlayerName(playerid, name, sizeof (name));
if (!strcmp(name, string[stringPos], true, id))
{
setarg(paramPos, 0, playerid);
num = true;
break;
}
}
if (!num)
{
setarg(paramPos, 0, INVALID_PLAYER_ID);
}
string[end] = ch;
#if defined __SSCANF_FOREACH__
#undef foreach
#undef __SSCANF_FOREACH__
#endif
}
stringPos = end;
}
case 's', 'z':
{
new
i = 0,
ch;
if (format[formatPos])
{
while ((ch = string[stringPos++]) && ch != delim)
{
setarg(paramPos, i++, ch);
}
if (!i)
{
return -1;
}
}
else
{
while ((ch = string[stringPos++]))
{
setarg(paramPos, i++, ch);
}
}
stringPos--;
setarg(paramPos, i, '\0');
}
default:
{
continue;
}
}
while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
{
stringPos++;
}
while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
{
stringPos++;
}
paramPos++;
}
do
{
if ((delim = format[formatPos++]) > ' ')
{
if (delim == '\'')
{
while ((delim = format[formatPos++]) && delim != '\'') {}
}
else if (delim != 'z')
{
return delim;
}
}
}
while (delim > ' ');
return 0;
}
forward Updatecheck(index, response_code, data[]);
public Updatecheck(index, response_code, data[])
{
if(response_code == 200)
{
if(strcmp(data,Version, false))
{
printf("Es liegt ein neues Update vor, bitte gehen sie auf die Seite Nemesus-Scripts.de und aktualisieren ihr Script");
printf("Neue Version",data);
}
}
return 1;
}
forward torbsn();
public torbsn()
{
MoveDynamicObject(bsntor,1194.2557373047, -941.72430419922, 41.753002166748,2.0);
}
forward Nachrichten();
public Nachrichten()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
SendClientMessage(i,Gelb,"Besucht unsere Homepage auf Nemesus-Scripts.de");
}
}
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, Rot, "Server: Dieser Befehl ist uns nicht bekannt (( /help ))");
return 1;
}