Also
Da ich immer wieder paar sachen scripte, die ihr vllt auch gebrauchen könntet poste ich sie hier..
GamerAdmin:
#include <a_samp>
#include <dini>
#include <dudb>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x9EC73DAA
#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 COLOR_PURPLE 0xC2A2DAAA
#define blau 0x2641FEAA
#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
#define LEVEL1 "Level 1:/healme , /goto [ID]"
#define LEVEL2 "Level 2: /kick [ID] [Grund] ,/healall ,"
#define LEVEL3 "Level 3: /ban [ID] [Grund] ,"
#define LEVEL4 "Level 4: /killall ,"
#define LEVEL5 "Level 5: /mgadmin [ID] [LEVEL] ,/kickall "
#define KEINADMIN "Du bist kein Admin!"
#define KEINADMIN1 "Du bist kein Admin Level 1!"
#define KEINADMIN2 "Du bist kein Admin Level 2!"
#define KEINADMIN3 "Du bist kein Admin Level 3!"
#define KEINADMIN4 "Du bist kein Admin Level 4!"
#define KEINADMIN5 "Du bist kein Admin Level 5!"
enum sInfo
{
score,
cash,
admin,
team,
}
new UpdateTimer;
new SpielerInfo[MAX_PLAYERS][sInfo];
new Eingeloggt[MAX_PLAYERS];
new Team[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
new string[256];
new Spieler[MAX_PLAYER_NAME];
GetPlayerName(playerid, Spieler, sizeof(Spieler));
format(string, sizeof(string), "%s.gameradmin", Spieler);
Eingeloggt[playerid] = 0;
SendClientMessage(playerid, rot, " Willkommen, Dieser Server benutzt GamerAdmin.");
SendClientMessage(playerid, rot, " Bitte beachte /admins !");
if (dini_Exists(string)) {
SendClientMessage(playerid, rot, " Bitte logge dich ein: /login [Password]");
}else{
SendClientMessage(playerid, rot, " Bitte registriere dich: /register [Password]"); }
return 1;
}
{
new string[256];
new Spieler[MAX_PLAYER_NAME];
GetPlayerName(playerid, Spieler, sizeof(Spieler));
format(string, sizeof(string), "%s.gameradmin", Spieler);
Eingeloggt[playerid] = 0;
SendClientMessage(playerid, rot, " Willkommen, Dieser Server benutzt GamerAdmin.");
SendClientMessage(playerid, rot, " Bitte beachte /admins !");
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)
{
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);
return 1;
}
{
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);
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;
}
{
#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;
}
{
#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;}
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;}
#pragma unused params
if(SpielerInfo[playerid][admin]>=1 || IsPlayerAdmin(playerid)) {
SetPlayerHealth(playerid,100);}
else { SendClientMessage(playerid,rot,KEINADMIN);}
return 1;}