habe mir ein Admin/register/login system runtergeladen und versucht ins script zu hauen:
// [Fun4Life] Reallife
//Created by Meisternuke and Powernuke
#include <a_samp>
#include <dini>
#include <core>
#include <float>
#include <time>
#include <file>
#include <morphinc>
#include <MidoStream>
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#pragma tabsize 0
new UpdateTimer;
new SpielerInfo[MAX_PLAYERS][sInfo];
new Eingeloggt[MAX_PLAYERS];
new Team[MAX_PLAYERS];
#define blue 0x375FFFFF
#define red 0xFF0000AA
#define green 0x33FF33AA
#define yellow 0xFFFF00AA
#define grey 0xC0C0C0AA
#define blue1 0x2641FEAA
#define lightblue 0x33CCFFAA
#define orange 0xFF9900AA
#define black 0x2C2727AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN1 0x33AA33AA
#define COLOR_BROWN 0xA52A2AAA
#define COLOR_GREY 0xAFAFAFAA
#define Grau 0x00FF00FF
#define rot 0xAA3333AA
#define COLOR_LIGHTRED 0xFF6347AA
#define hellblau 0x33CCFFAA
#define COLOR_LIGHTGREEN 0x9ACD32AA
#define COLOR_YELLOW 0xDABB3EAA
#define Gelb 0xDABB3EAA
#define COLOR_WHITE 0xFFFFFFAA
#define blau 0x2641FEAA
#define LEVEL1
#define LEVEL2
#define LEVEL3
#define LEVEL4
#define LEVEL5
#define KEINADMIN
#define KEINADMIN1
#define KEINADMIN2
#define KEINADMIN3
#define KEINADMIN4
#define KEINADMIN5
enum sInfo
{
score,
cash,
admin,
team,
}
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
new string[256];
new Spieler[MAX_PLAYER_NAME];
GetPlayerName(playerid, Spieler, sizeof(Spieler));
format(string, sizeof(string), "%s.sav", Spieler);
Eingeloggt[playerid] = 0;
SendClientMessage(playerid, rot, " Willkommen auf dem Server.");
if (dini_Exists(string)) {
SendClientMessage(playerid, rot, " Bitte logge dich ein: /login [Password]");
}else{
SendClientMessage(playerid, rot, " Bitte registriere dich: /register [Password]"); }
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new string[256];
new Spieler[MAX_PLAYER_NAME];
GetPlayerName(playerid, Spieler, sizeof(Spieler));
format(string, sizeof(string), "%s.gameradmin", Spieler);
dini_IntSet(string, "score", GetPlayerScore(playerid));
dini_IntSet(string, "cash", GetPlayerMoney(playerid));
dini_IntSet(string, "admin", SpielerInfo[playerid][admin]);
dini_IntSet(string, "team", GetPlayerTeam(playerid));
Eingeloggt[playerid] = 0;
KillTimer(UpdateTimer);
MidoStreamDisconnect(playerid);
return 1;
}
public OnPlayerSpawn(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[])
{
dcmd(ahelp,5,cmdtext);
//----------------------------
dcmd(mgadmin,7,cmdtext);
//----------------------------
dcmd(register,8,cmdtext);
dcmd(login,5,cmdtext);
dcmd(admins,6,cmdtext);
//----------------------------
dcmd(kick,4,cmdtext);
dcmd(ban,3,cmdtext);
dcmd(healall,7,cmdtext);
dcmd(healme,4,cmdtext);
dcmd(killall,7,cmdtext);
dcmd(kickall,7,cmdtext);
dcmd(goto,4,cmdtext);
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;
}
dcmd_kickall(playerid,params[])
{
#pragma unused params
if(SpielerInfo[playerid][admin]>=5 || IsPlayerAdmin(playerid)) {
SendClientMessageToAll(rot,"Alle wurden vom Server gekickt.");
for(new i =0; i < MAX_PLAYERS;i++) {
Kick(i);
}
}
else {
SendClientMessage(playerid,rot,KEINADMIN);//thx an Goldkiller
return 1;
}
return 1;
}
dcmd_admins(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid, rot, "***Admins Online:");
new string[128];
new sendername[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(SpielerInfo[i][admin] > 0|| IsPlayerAdmin(i)) {
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 128, " %s (Level:%d)", sendername,SpielerInfo[i][admin]);
SendClientMessage(playerid, rot, string);
}}}
return 1;
}
dcmd_goto(playerid,params[]) {
if(SpielerInfo[playerid][admin]>=1 || IsPlayerAdmin(playerid)) {
new typ = strval(strget(params, 1));
if(IsPlayerConnected(typ)) {
new Float:x, Float:y, Float:z;
GetPlayerPos(typ,x,y,z);
SetPlayerPos(playerid,x,y,z);
SetPlayerInterior(playerid,GetPlayerInterior(typ));
}else{
SendClientMessage(playerid,rot,"ID nicht vergeben"); }
return 1;}
else { SendClientMessage(playerid,rot,KEINADMIN);}
return 1;}
dcmd_healme(playerid,params[]) {
#pragma unused params
if(SpielerInfo[playerid][admin]>=1 || IsPlayerAdmin(playerid)) {
SetPlayerHealth(playerid,100);}
else { SendClientMessage(playerid,rot,KEINADMIN);}
return 1;}
dcmd_healall(playerid,params[]) {
new string[128];
#pragma unused params
if(SpielerInfo[playerid][admin]>=2 || IsPlayerAdmin(playerid)) {
for(new i = 0; i <= MAX_PLAYERS; i++) {
SetPlayerHealth(i,100);}
new Text[32];
new SpielerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,SpielerName,sizeof(SpielerName));
format(Text,sizeof(Text),"%s hat alle geheilt!",SpielerName);
SendClientMessageToAll(rot,Text);
format(string,sizeof(string),"Admin: %s Hat alle geheilt!",admin);}
else { SendClientMessage(playerid,rot,KEINADMIN);}
return 1;}
dcmd_killall(playerid,params[]) {
new string[128];
#pragma unused params
if(SpielerInfo[playerid][admin]>=4 || IsPlayerAdmin(playerid)) {
for(new i = 0; i <= MAX_PLAYERS; i++) {
SetPlayerHealth(i,0);}
new Text[32];
SendClientMessageToAll(rot,Text);
format(string,sizeof(string),"Admin: %s Hat alle gekillt!",admin);}
else { SendClientMessage(playerid,rot,KEINADMIN);}
return 1;}
dcmd_ahelp(playerid,params[]) {
#pragma unused params
if(SpielerInfo[playerid][admin]>=1 || IsPlayerAdmin(playerid)) {
SendClientMessage(playerid,blau,LEVEL1);}
else { SendClientMessage(playerid,rot,KEINADMIN1);}
if(SpielerInfo[playerid][admin]>=2 || IsPlayerAdmin(playerid)) {
SendClientMessage(playerid,blau,LEVEL2);}
else { SendClientMessage(playerid,rot,KEINADMIN2);}
if(SpielerInfo[playerid][admin]>=3 || IsPlayerAdmin(playerid)) {
SendClientMessage(playerid,blau,LEVEL3);}
else { SendClientMessage(playerid,rot,KEINADMIN3);}
if(SpielerInfo[playerid][admin]>=4 || IsPlayerAdmin(playerid)) {
SendClientMessage(playerid,blau,LEVEL4);}
else { SendClientMessage(playerid,rot,KEINADMIN4);}
if(SpielerInfo[playerid][admin]>=5 || IsPlayerAdmin(playerid)) {
SendClientMessage(playerid,blau,LEVEL5);}
else { SendClientMessage(playerid,rot,KEINADMIN5);}
return 1;}
dcmd_kick(playerid,params[]) {//by tut
if(SpielerInfo[playerid][admin]>=2 || IsPlayerAdmin(playerid)) {
new
sGrund[128],
pID;
if(sscanf(params, "dz",pID,sGrund)) {
return SendClientMessage(playerid,rot,"USAGE: /kick [playerid] ([grund],optional)");
}
if(!IsPlayerConnected(pID)) {
return SendClientMessage(playerid,rot,"Kein Spieler mit angegebener ID Online");
}
new
ThePlayer[MAX_PLAYER_NAME],
string[128];
GetPlayerName(pID,ThePlayer,sizeof(ThePlayer));
format(string,sizeof(string),"%s (ID %d) wurde vom Server gekickt,Grund: %s",ThePlayer,pID,sGrund[0] ? sGrund : "<Kein Grund>");
SendClientMessageToAll(COLOR_YELLOW,string);
Kick(pID);
} else { SendClientMessage(playerid,rot,KEINADMIN); }
return 1;
}
dcmd_ban(playerid,params[]) {// by tut
if(SpielerInfo[playerid][admin]>=3 || IsPlayerAdmin(playerid)) {
new
sGrund[128],
pID;
if(sscanf(params, "dz",pID,sGrund)) {
return SendClientMessage(playerid,rot,"USAGE: /ban [playerid] ([grund],optional)");
}
if(!IsPlayerConnected(pID)) {
return SendClientMessage(playerid,rot,"Kein Spieler mit angegebener ID Online");
}
new
ThePlayer[MAX_PLAYER_NAME],
string[128];
GetPlayerName(pID,ThePlayer,sizeof(ThePlayer));
format(string,sizeof(string),"%s (ID %d) wurde vom Server gebant,Grund: %s",ThePlayer,pID,sGrund[0] ? sGrund : "<Kein Grund>");
SendClientMessageToAll(COLOR_YELLOW,string);
Ban(pID);
} else { SendClientMessage(playerid,rot,KEINADMIN); }
return 1;
}
bitte jemand ein topic erstellen damit ich fortsetzten kann