Beiträge von xx7xx7xx
-
-
Die Überschrift sagt alles.
Mein Script: http://www.mediafire.com/?zqo70qwd3w1968eGood Luck xD
erstes mal auf englisch viel Glück geschrieben. -
Geht schon hat Phillip_ mir schon gesagt xD
-
Danke Phillip_
-
Alle warnings:
C:\Program Files\GTA\GTA Server\gamemodes\[GDL]GermanDayLife.pwn(539) : warning 217: loose indentation
C:\Program Files\GTA\GTA Server\gamemodes\[GDL]GermanDayLife.pwn(601) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase2 Warnings.
-
So jetzt geht alles wieder aber ich habe 2 warnings die nerven.
Hier sind die warnings:
C:\Program Files\GTA\GTA Server\gamemodes\[GDL]GermanDayLife.pwn(539) : warning 217: loose indentation
C:\Program Files\GTA\GTA Server\gamemodes\[GDL]GermanDayLife.pwn(601) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase2 Warnings.
-
Geht ned
Hier mein Script:http://www.mediafire.com/?ehhyeip3ey818t4 -
-
Alles wird von dre Überschrift gesagt
Hier mein Script: http://www.mediafire.com/?jb06vk9c1un0031 -
}
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==DIALOG_LOGIN)
{
if(response==0)
{
SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen /n und wurdest deshalb gekickt");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,ROT,"Das Passwort war nicht lang genug");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Account gefunden /n Gib bitte dein Passwort ein","Einlogen","Abbruch");
return 1;
}
else
{
Login(playerid,inputtext);
return 1;
}
}
}if(dialogid==DIALOG_REGISTER)
{
if(response==0)
{
SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen /n und wurdest deshalb gekickt");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,ROT,"Das Passwort war nicht lang genug");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Gib bitte das gewünschte Passwort ein","Registrieren","Abbruch");
return 1;
}
else
{
Register(playerid,inputtext);
return 1;
}
}
}
if(dialogid==1)
{
if(response==0)
switch(listitem)
{
case 0:
{GivePlayerWeapon(playerid,4,1);
GivePlayerMoney(playerid,-100);
SendClientMessage(playerid,BLAU,"Du hast dir ein Messer gekauft (Kosten:100$)");
}
case 1:
{
GivePlayerWeapon(playerid,1,1);
GivePlayerMoney(playerid,-50);
SendClientMessage(playerid,BLAU,"Du hast dir ein Schlagring gekauft (Kosten:50$)");
}
case 2:
{
GivePlayerWeapon(playerid,6,1);
GivePlayerMoney(playerid,-100);
SendClientMessage(playerid,BLAU,"Du hast dir eine Schaufel gekauft (Kosten:100$)");
}
case 3:
{
GivePlayerWeapon(playerid,2,1);
GivePlayerMoney(playerid,-100);
SendClientMessage(playerid,BLAU,"Du hast dir einen Golfschläger gekauft (Kosten:100$)");
}
case 4:
{
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-250);
SendClientMessage(playerid,BLAU,"Du hast dir eine Deagle gekauft (Kosten:250$)");
}
case 5:
{
GivePlayerWeapon(playerid,23,100);
GivePlayerMoney(playerid,-150);
SendClientMessage(playerid,BLAU,"Du hast dir eine SchalldämpferPistole gekauft (Kosten:250$)");
}
case 6:
{
GivePlayerWeapon(playerid,29,300);
GivePlayerMoney(playerid,-350);
SendClientMessage(playerid,BLAU,"Du hast dir eine MP5 gekauft(Kosten:350$)");
}
case 7:
{
GivePlayerWeapon(playerid,31,250);
GivePlayerMoney(playerid,-550);
SendClientMessage(playerid,BLAU,"Du hast dir eine M4 gekauft(Kosten:550$)");
}
case 8:
{
GivePlayerWeapon(playerid,30,260);
GivePlayerMoney(playerid,-550);
SendClientMessage(playerid,BLAU,"Du hast dir eine AK47 gekauft(Kosten:550$) ");
}
}
}
return 1;
}stock SpielerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}stock Register(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_Create(Spielerdatei);
dini_Set(Spielerdatei,"Passwort",key);
SendClientMessage(playerid,GRUN,"Erfolgreich registriert");
SetPlayerScore(playerid,0);
SetPVarInt(playerid,"loggedin",1);
return 1;
}stock Login(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(!strcmp(key,dini_Get(Spielerdatei,"Passwort"),false))
{
LoadAccount(playerid);
SendClientMessage(playerid,GRUN,"Erfolgreich eingeloggt.");
return 1;
}
else
{
SendClientMessage(playerid,ROT,"Falsches Passwort.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
return 1;
}
}stock LoadAccount(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
SetPVarInt(playerid,"Adminlevel",dini_Int(Spielerdatei,"Adminlevel"));
SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
SetPVarInt(playerid,"baned",dini_Int(Spielerdatei,"baned"));
SetPVarInt(playerid,"loggedin",1);
//SpielerInfo[playerid][Adminlevel]=dini_Int(Spielerdatei,"Adminlevel");
//SpielerInfo[playerid][Fraktion]=dini_Int(Spielerdatei,"Fraktion");
if(GetPVarInt(playerid,"baned")==1)
{
SendClientMessage(playerid,ROT,"Du bist vom Server gebannt! :p");
Kick(playerid);
}
return 1;
}stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
dini_IntSet(Spielerdatei,"baned",GetPVarInt(playerid,"baned"));
}
return 1;
}stock isPlayerAnAdmin(playerid,rang)
{
if(GetPVarInt(playerid,"Adminlevel")>=rang)return 1;
return 0;}
stock sscanf(sstring[], format[], {Float,_}:...)
{
#if defined isnull
if (isnull(sstring))
#else
if (sstring[0] == 0 || (sstring[0] == 1 && sstring[1] == 0))
#endif
{
return format[0];
}
#pragma tabsize 4
new
formatPos = 0,
sstringPos = 0,
paramPos = 2,
paramCount = numargs(),
delim = ' ';
while (sstring[sstringPos] && sstring[sstringPos] <= ' ')
{
sstringPos++;
}
while (paramPos < paramCount && sstring[sstringPos])
{
switch (format[formatPos++])
{
case '\0':
{
return 0;
}
case 'i', 'd':
{
new
neg = 1,
num = 0,
ch = sstring[sstringPos];
if (ch == '-')
{
neg = -1;
ch = sstring[++sstringPos];
}
do
{
sstringPos++;
if ('0' <= ch <= '9')
{
num = (num * 10) + (ch - '0');
}
else
{
return -1;
}
}
while ((ch = sstring[sstringPos]) > ' ' && ch != delim);
setarg(paramPos, 0, num * neg);
}
case 'h', 'x':
{
new
num = 0,
ch = sstring[sstringPos];
do
{
sstringPos++;
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 = sstring[sstringPos]) > ' ' && ch != delim);
setarg(paramPos, 0, num);
}
case 'c':
{
setarg(paramPos, 0, sstring[sstringPos++]);
}
case 'f':
{new changestr[16], changepos = 0, strpos = sstringPos;
while(changepos < 16 && sstring[strpos] && sstring[strpos] != delim)
{
changestr[changepos++] = sstring[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(sstring, format[formatPos], false, sstringPos)) == -1)
{
if (format[end + 1])
{
return -1;
}
return 0;
}
format[end] = '\'';
sstringPos = ch + (end - formatPos);
formatPos = end + 1;
}
case 'u':
{
new
end = sstringPos - 1,
id = 0,
bool:num = true,
ch;
while ((ch = sstring[++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
sstring[end] = '\0';
num = false;
new
name[MAX_PLAYER_NAME];
id = end - sstringPos;
foreach (Player, playerid)
{
GetPlayerName(playerid, name, sizeof (name));
if (!strcmp(name, sstring[sstringPos], true, id))
{
setarg(paramPos, 0, playerid);
num = true;
break;
}
}
if (!num)
{
setarg(paramPos, 0, INVALID_PLAYER_ID);
}
sstring[end] = ch;
#if defined __SSCANF_FOREACH__
#undef foreach
#undef __SSCANF_FOREACH__
#endif
}
sstringPos = end;
}
case 's', 'z':
{
new
i = 0,
ch;
if (format[formatPos])
{
while ((ch = sstring[sstringPos++]) && ch != delim)
{
setarg(paramPos, i++, ch);
}
if (!i)
{
return -1;
}
}
else
{
while ((ch = sstring[sstringPos++]))
{
setarg(paramPos, i++, ch);
}
}
sstringPos--;
setarg(paramPos, i, '\0');
}
default:
{
continue;
}
}
while (sstring[sstringPos] && sstring[sstringPos] != delim && sstring[sstringPos] > ' ')
{
sstringPos++;
}
while (sstring[sstringPos] && (sstring[sstringPos] == delim || sstring[sstringPos] <= ' '))
{
sstringPos++;
}
paramPos++;
}
do
{
if ((delim = format[formatPos++]) > ' ')
{
if (delim == '\'')
{
while ((delim = format[formatPos++]) && delim != '\'') {}
}
else if (delim != 'z')
{
return delim;
}
}
}
while (delim > ' ');
return 0;
}Errormeldung:
C:\Program Files\GTA\GTA Server\gamemodes\GermanDayLife.pwn(44) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase1 Error.
-
//Includs
#include <a_samp>
#include <dini>
#include <ocmd>
//Dialoge
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
//Farben
#define ROT 0xCA0000FF
#define GRUN 0x00FF00FF
#define GELB 0xFFFF00FF
#define GRUNHELL 0xB7FF7DFF
#define BLAU 0x0000FFFF
#define ROTDUNKEL 0xC10000FF
//Fraktionsnamen
//Stadtfraks
#define fraktname1 "LSPD"
#define fraktname2 "Army"
#define fraktname3 "FBI"
#define fraktname4 "President"
#define fraktname5 "Bodyguard"
#define fraktname6 "Medic"
#define fraktname7 "Feuerwehr"
#define fraktname8 "Ordnungsamt"
#define fraktname9 "Taxi"
#define fraktname10 "San Andreas Medien AG"
//Gangs und Mafien
#define fraktname11 "Grove Street"
#define fraktname12 "Front Yard Ballas"
#define fraktname13 "Las Santos Vagos"
#define fraktname14 "La Cosa Nostra"
#define fraktname15 "Yakuza"
#define fraktname16 "Los Aztecas"
#define fraktname17 "Terroristen"
#define fraktname18 "Russische Mafia"
#define fraktname19 "Red Soldiers"
#define fraktname20 "Los Santos Bikerklub"
//Variablen
new AMUenter;
new AMUexit;
new waffen_kauf;
new tor;
//Pickup
AMUenter=CreatePickup(1239,2,1368.3853,-1279.7742,13.5469);
AMUexit=CreatePickup(1318,2,316.4271,-169.6953,999.6010);
bsnenter=CreatePickup(1318,2,1199.2980,-918.9647,43.1167);
waffen_kauf=CreatePickup(1239,2,312.3146,-166.1411,999.6010);main()
{
print("\n----------------------------------");
print(" GermanDayLife");
print("----------------------------------\n");
}public OnGameModeInit()
{
DisableInteriorEnterExits();//Keine Marker aus dem Singleplayer
SetGameModeText("GDL v 0.4");
AddPlayerClass(0, 1715.2509,-1911.7201,13.5665, 269.1425, 0, 0, 0, 0, 0, 0);
//Objects
//Extras
CreateObject(1359, 1703.5999755859, -1917.1999511719, 13.300000190735, 0, 0, 0);
CreateObject(1235, 1712.6999511719, -1908.8000488281, 13.10000038147, 0, 0, 0);
CreateObject(2744, 1711.1999511719, -1890.0999755859, 14.699999809265, 0, 0, 0);
CreateObject(1775, 1703.0999755859, -1898.4000244141, 13.699999809265, 0, 0, 92);
CreateObject(1366, 1727.5999755859, -1860.4000244141, 13.199999809265, 0, 0, 0);
CreateObject(1346, 1734.1999511719, -1860.8000488281, 13.89999961853, 0, 0, 176);
CreateObject(1319, 1699.9000244141, -1860.8000488281, 13.10000038147, 0, 0, 0);
CreateObject(1319, 1700.0999755859, -1862.5, 13.10000038147, 0, 0, 0);
CreateObject(1319, 1700.4000244141, -1864.4000244141, 13.10000038147, 0, 0, 0);
CreateObject(1319, 1700.5999755859, -1866.5, 13.10000038147, 0, 0, 0);
CreateObject(1319, 1700.8000488281, -1869, 13.10000038147, 0, 0, 0);
CreateObject(1257, 1474.6999511719, -1724.5999755859, 13.800000190735, 0, 0, 90);
CreateObject(3934, 1563.5999755859, -1705, 27.39999961853, 0, 0, 0);
CreateObject(3934, 1562.9000244141, -1645.0999755859, 27.39999961853, 0, 0, 0);
CreateObject(1349, 1103.6999511719, -1436.9000244141, 15.39999961853, 0, 0, 0);
CreateObject(1349, 1103.6999511719, -1435.8000488281, 15.39999961853, 0, 0, 0);
CreateObject(1349, 1103.6999511719, -1434.5999755859, 15.39999961853, 0, 0, 0);
CreateObject(1359, 1102.8000488281, -1448.6999511719, 15.5, 0, 0, 0);
CreateObject(1776, 1102, -1463.4000244141, 15.89999961853, 0, 0, 70);
CreateObject(1292, 2462.3000488281, -1689.6999511719, 13.10000038147, 0, 0, 188);
CreateObject(1265, 2458.1999511719, -1683.1999511719, 13, 0, 0, 0);
CreateObject(1265, 2459.8000488281, -1680.9000244141, 13, 0, 0, 0);
CreateObject(1220, 2448.6999511719, -1688.4000244141, 12.89999961853, 0, 0, 0);
CreateObject(1227, 2511.3999023438, -1682.5, 13.39999961853, 0, 0, 220);
CreateObject(13011, 2525.6999511719, -1669.6999511719, 14.89999961853, 0, 0, 272);
//LSPD Base
CreateObject(8674, 1544.9000244141, -1602.4000244141, 17.39999961853, 0, 0, 0);
CreateObject(8674, 1539.5999755859, -1612.5999755859, 17.39999961853, 0, 0, 90);
CreateObject(8674, 1539.8000488281, -1607.5, 17.39999961853, 0, 0, 90);
CreateObject(8674, 1565.4000244141, -1602.4000244141, 17.39999961853, 0, 0, 0);
CreateObject(8674, 1555.0999755859, -1602.5, 17.39999961853, 0, 0, 0);
CreateObject(8674, 1575.6999511719, -1602.3000488281, 17.39999961853, 0, 0, 0);
CreateObject(8674, 1585.8000488281, -1602.4000244141, 17.39999961853, 0, 0, 0);
CreateObject(8674, 1596, -1602.4000244141, 17.39999961853, 0, 0, 0);
CreateObject(8674, 1603.1999511719, -1638.0999755859, 17.39999961853, 0, 0, 0);
CreateObject(8674, 1608.0999755859, -1607.5999755859, 17.39999961853, 0, 0, 90);
CreateObject(8674, 1608.0999755859, -1617.8000488281, 17.39999961853, 0, 0, 90);
CreateObject(8674, 1608.0999755859, -1627.8000488281, 17.39999961853, 0, 0, 90);
CreateObject(8674, 1608.0999755859, -1632.8000488281, 17.39999961853, 0, 0, 90);
CreateObject(8674, 1602.7998046875, -1602.3994140625, 17.39999961853, 0, 0, 0);
tor=CreateObject(2990, 1539.4000244141, -1628, 16.299999237061, 0, 0, 270);
CreateObject(974, 1539.6999511719, -1619.5999755859, 15.300000190735, 0, 0, 90);
CreateObject(974, 1539.4000244141, -1636.4000244141, 15.300000190735, 0, 0, 90);
CreateObject(974, 1539.3000488281, -1642.6999511719, 15.300000190735, 0, 0, 90);
CreateObject(974, 1541.9000244141, -1647.8000488281, 15.800000190735, 0, 0, 144);
//Fahrzeuge
//Spawn
AddStaticVehicle(481,1704.8000488281,-1930.3000488281,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1916.6999511719,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1931.0999755859,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1916,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1917.5,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1919,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1920.3000488281,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1921.3000488281,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1922.5,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1923.8000488281,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1925.1999511719,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1926.3000488281,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1927.3994140625,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1928.1999511719,13.199999809265,268,1,1);
AddStaticVehicle(481,1704.8000488281,-1929.0999755859,13.199999809265,268,1,1);
return 1;
}public OnGameModeExit()
{
return 1;
}public OnPlayerRequestClass(playerid, classid)
{
SetPlayerVirtualWorld(playerid,1+playerid);
SetPlayerPos(playerid, 1715.2509,-1911.7201,13.5665);
SetPlayerCameraPos(playerid, 1715.0929,-1910.2992,13.5665);
SetPlayerCameraLookAt(playerid, 1715.2509,-1911.7201,13.5665);
return 1;
}public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,GELB,"Wilkommen auf GDL[GermanDayLife] viel Spaß");
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(dini_Exists(Spielerdatei))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Account gefunden Gib bitte dein Passwort ein","Einlogen","Abbruch");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Gib bitte das gewünschte Passwort ein","Registrieren","Abbruch");
}
return 1;
}public OnPlayerDisconnect(playerid, reason)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
SpielerSpeichern(playerid);
}
return 1;
}public OnPlayerSpawn(playerid)
{
SetPlayerVirtualWorld(playerid,0);
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("/gotoAMU",cmdtext,true)==0)
{
if(isPlayerAnAdmin(playerid,1))
{
SetPlayerPos(playerid,1364.4803,-1284.7002,13.5469);
SendClientMessage(playerid,GRUN,"Du hast dich erfolgreich teleportiert.");
return 1;
}
SendClientMessage(playerid,ROT,"Du bist kein Admin!");
}
if(strcmp("/gotoPD", cmdtext, true) ==0)
{
if(isPlayerAnAdmin(playerid,1))
{
SetPlayerPos(playerid,1542.1548,-1675.6178,13.5539);
SendClientMessage(playerid,0x00FF10FF, "Du hast dich erfolgreich teleportiert.");
return 1;
}
SendClientMessage(playerid,ROT,"Du bist kein Admin!");
}
if(strcmp("/gotoBSN", cmdtext, true) == 0)
{
if(isPlayerAnAdmin(playerid,1))
{
SetPlayerPos(playerid,1200.6033,-923.7955,43.0128);
SendClientMessage(playerid,GRUN,"Du hast dich erfolgreich teleportiert.");
return 1;
}
SendClientMessage(playerid,ROT,"Du bist kein Admin");
}
if(strcmp(cmdtext,"/stats",true)==0)
{
new string[128];
new fraktname[64];
switch(GetPVarInt(playerid,"Fraktion"))
{
case 0:{fraktname="Zivilist";}
case 1:{fraktname=fraktname1;}
case 2:{fraktname=fraktname2;}
case 3:{fraktname=fraktname3;}
case 4:{fraktname=fraktname4;}
case 5:{fraktname=fraktname5;}
case 6:{fraktname=fraktname6;}
case 7:{fraktname=fraktname7;}
case 8:{fraktname=fraktname8;}
case 9:{fraktname=fraktname9;}
case 10:{fraktname=fraktname10;}
case 11:{fraktname=fraktname11;}
case 12:{fraktname=fraktname12;}
case 13:{fraktname=fraktname13;}
case 14:{fraktname=fraktname14;}
case 15:{fraktname=fraktname15;}
case 16:{fraktname=fraktname16;}
case 17:{fraktname=fraktname17;}
case 18:{fraktname=fraktname18;}
case 19:{fraktname=fraktname19;}
case 20:{fraktname=fraktname20;}
}
//Reihe 1
format(string,sizeof(string),"[Name: %s] [Level: %i] [Adminlevel: %i] [Fraktion: %s]",SpielerName(playerid),GetPlayerScore(playerid),GetPVarInt(playerid,"Adminlevel"),fraktname);
SendClientMessage(playerid,GRUNHELL,string);
}
if(strcmp(cmdtext,"/heal",true)==0)
{
if(isPlayerAnAdmin(playerid,1))
{
SetPlayerHealth(playerid,100);
SendClientMessage(playerid,GRUN,"Du hast dich geheilt.");
return 1;
}
SendClientMessage(playerid,ROT,"Du bist kein Admin!");
return 1;
}if(strcmp(cmdtext,"/selbstmord",true)==0)
{
SetPlayerHealth(playerid,0);
return 1;
}
if(strcmp(cmdtext,"/restart",true)==0)
{
if(isPlayerAnAdmin(playerid,5))
{
SendRconCommand("gmx");
return 1;
}
SendClientMessage(playerid,ROT,"Du bist kein Admin!");
return 1;
}
return 1;
}/*OCMDS*/
ocmd:pd1auf(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,10,1541.9000244141, -1647.8000488281, 15.800000190735))return SendClientMessage(playerid,ROT,"Du bist nicht in der nähe vom Tor");
MoveObject(tor,1541.9000244141, -1647.8000488281, 15.800000190735,3);
return 1;
}
ocmd:pd1zu(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,10,1541.9000244141, -1647.8000488281, 15.800000190735))return SendClientMessage(playerid,ROT,"Du bist nicht in der nähe vom Tor");
MoveObject(tor,1541.9000244141, -1647.8000488281, 15.800000190735,3);
return 1;
}
ocmd:makeadmin(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new pID, rank;
if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,BLAU,"/makeadmin [ID] [Adminlevel]");
if(rank<1||rank>5)return SendClientMessage(playerid,ROT,"Bitte gültiges Adminlevel angeben.");
SetPVarInt(pID,"Adminlevel",rank);
SpielerSpeichern(pID);
SendClientMessageToAll(GRUN,".:[Es wurde jemand zum Admin gemacht.]:.");
return 1;
}ocmd:ban(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,2))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new pID, reason[128],string[128];
if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,BLAU,"/ban [ID oder voller Name] [Grund]");
format(string,sizeof(string),"AdmCmd: %s wurde von %s gebannt. Grund: %s",SpielerName(pID),SpielerName(playerid),reason);
SendClientMessageToAll(ROTDUNKEL,string);
SetPVarInt(pID,"baned",1);
Kick(pID);
return 1;
}ocmd:kick(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new pID, reason[128],string[128];
if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,BLAU,"/kick [ID oder voller Name] [Grund]");
format(string,sizeof(string),"AdmCmd: %s wurde von %s gekickt. Grund: %s",SpielerName(pID),SpielerName(playerid),reason);
SendClientMessageToAll(ROTDUNKEL,string);
Kick(pID);
return 1;
}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)
{
if(pickupid==AMUenter)
{
SetPlayerPos(playerid,316.524993,-167.706985,999.593750);
SetPlayerFacingAngle(playerid,84.1296);
SetPlayerInterior(playerid,6);
GameTextForPlayer(playerid,"Willkommen im ~n~~y~Ammunation",3000,5);}
if(pickupid==AMUexit)
{
SetPlayerPos(playerid,1366.1970,-1279.7380,13.5469);
SetPlayerFacingAngle(playerid,90);
SetPlayerInterior(playerid,0);
}
if(pickupid==waffen_kauf)
{
if(GetPlayerMoney(playerid)>500)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Was möchtest du kaufen?","Messer\nSchlagring\nSchaufel\nGolfschläger\nDesert Eagle\nSchalldämpferpistole\nMP5\nM4\nAK47","Abbrechen","Bestätigen");
}
else
{
SendClientMessage(playerid,ROT,"Du hast nicht genügend Geld dabei. Komm wieder wenn du mind. 500$ hast!");
}
}
return 1; -
Soll ich ma das script hohladen wenn ich das so mache also bei OnGameModeInit rein dann hab ich 6 errors.
-
Hallo Leute,
Das ist schon mein 2ter fehler den ich nicht lösen kann.
Zeile 1 bis 47:
//Includs
#include
#include
#include
//Dialoge
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
//Farben
#define ROT 0xCA0000FF
#define GRUN 0x00FF00FF
#define GELB 0xFFFF00FF
#define GRUNHELL 0xB7FF7DFF
#define BLAU 0x0000FFFF
#define ROTDUNKEL 0xC10000FF
//Fraktionsnamen
//Stadtfraks
#define fraktname1 "LSPD"
#define fraktname2 "Army"
#define fraktname3 "FBI"
#define fraktname4 "President"
#define fraktname5 "Bodyguard"
#define fraktname6 "Medic"
#define fraktname7 "Feuerwehr"
#define fraktname8 "Ordnungsamt"
#define fraktname9 "Taxi"
#define fraktname10 "San Andreas Medien AG"
//Gangs und Mafien
#define fraktname11 "Grove Street"
#define fraktname12 "Front Yard Ballas"
#define fraktname13 "Las Santos Vagos"
#define fraktname14 "La Cosa Nostra"
#define fraktname15 "Yakuza"
#define fraktname16 "Los Aztecas"
#define fraktname17 "Terroristen"
#define fraktname18 "Russische Mafia"
#define fraktname19 "Red Soldiers"
#define fraktname20 "Los Santos Bikerklub"
//Variablen
new AMUenter;
new AMUexit;
new waffen_kauf;
new tor;
//Pickup
AMUenter=CreatePickup(1239,2,1368.3853,-1279.7742,13.5469);
AMUexit=CreatePickup(1318,2,316.4271,-169.6953,999.6010);
bsnenter=CreatePickup(1318,2,1199.2980,-918.9647,43.1167);
waffen_kauf=CreatePickup(1239,2,312.3146,-166.1411,999.6010);Da Steht der Fehler ist in zeile 44.
Ich hoffe ihr könnt mir helfen.
Viel Glück! -
Thy das hat geklappt
-
Hey Leute ich mach es kurz
Fehlermeldung:
C:\Program Files\GTA\GTA Server\gamemodes\GermanDayLife.pwn(287) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase1 Error.
Zeile 280 bis 300:
stock Login(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(!strcmp,(key,dini_Get(Spielerdatei,"Passwort"),false))
{
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
SendClientMessage(playerid,GRUN,"Erfolgreich eingelogt");
return 1;
}{
SendClientMessage(playerid,ROT,"Falsches Passwort");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Account gefunden /n Gib bitte dein Passwort ein","Einlogen","Abbruch");
return 1;
}}