Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // The Next Generation Reallife //
- // by DarkShadow //
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /*
- Dieses Script wurde von DarkShadow erstellt und ist Eigentum von TNGR Reallife.
- */
- #include <a_samp>
- #include <dini>
- #include <zcmd>
- #define DIALOG_LOGIN 1
- #define DIALOG_REGISTER 2
- #define COLOR_RED 0xEB0000FF
- #define COLOR_GREEN 0x419C00FF
- #define COLOR_GREY 0xBEBEBEFF
- #define COLOR_WHITE 0xFAFAFAFF
- new TutTime[MAX_PLAYERS];
- new supmobil[MAX_PLAYERS];
- new Menu:LCNSkin;
- new Menu:GroveSkin;
- enum SpielerDatei
- {
- pLevel,
- pAdmin,
- pSkin,
- pGeld,
- pBankgeld,
- pFraktion,
- pLeader,
- pName[MAX_PLAYER_NAME],
- pRank
- }
- new Spieler[MAX_PLAYERS][SpielerDatei];
- main()
- {
- print("");
- print("");
- print("");
- print("Gamemode von DarkShadow");
- }
- public OnGameModeInit()
- {
- SetGameModeText("German Reallife");
- // Menüs
- LCNSkin = CreateMenu("Skin wählen", 2, 200.0, 100.0, 150.0, 150.0);
- AddMenuItem(LCNSkin, 0, "Skin nehmen");
- AddMenuItem(LCNSkin, 0, "anderen Skin aussuchen");
- GroveSkin = CreateMenu("Skin wählen", 2, 200.0, 100.0, 150.0, 150.0);
- AddMenuItem(GroveSkin, 0, "Skin nehmen");
- AddMenuItem(GroveSkin, 0, "anderen Skin aussuchen");
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- new pfad[128];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(pfad,sizeof(pfad),"/Accounts/%s.ini",name);
- if(dini_Exists(pfad))
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte gebe nun dein Passwort ein","Login","Abbrechen");
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Bitte wähle ein Passwort für deinen Account","Register","Abbrechen");
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(GetPVarInt(playerid,"Neuling") == 1)
- {
- TogglePlayerControllable(playerid,0);
- SetPlayerPos(playerid,1956.5836,1343.0247,15.3746);
- SendClientMessage(playerid,COLOR_GREEN,"Du musst dir nun folgendes Tutorial ansehen um auf dem Server spielen zu können!");
- SetTimerEx("Tutorial",1000,true,"u",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)
- {
- if(GetPlayerMenu(playerid) == LCNSkin)
- {
- switch(row)
- {
- case 0:
- {
- SetPlayerPos(playerid,-2719.5110,-318.6884,7.8438);
- TogglePlayerControllable(playerid,1);
- SetPVarInt(playerid,"GutSkin",0);
- }
- case 1:
- {
- if(GetPVarInt(playerid,"GutSkin") == 0)
- {
- SetPlayerSkin(playerid,112);
- TogglePlayerControllable(playerid,0);
- ShowMenuForPlayer(LCNSkin,playerid);
- SetPVarInt(playerid,"GutSkin",1);
- }
- else if(GetPVarInt(playerid,"GutSkin") == 1)
- {
- SetPlayerSkin(playerid,113);
- TogglePlayerControllable(playerid,0);
- ShowMenuForPlayer(LCNSkin,playerid);
- SetPVarInt(playerid,"GutSkin",2);
- }
- else if(GetPVarInt(playerid,"GutSkin") == 2)
- {
- SetPlayerSkin(playerid,111);
- TogglePlayerControllable(playerid,0);
- ShowMenuForPlayer(LCNSkin,playerid);
- SetPVarInt(playerid,"GutSkin",0);
- }
- }
- }
- }
- if(GetPlayerMenu(playerid) == GroveSkin)
- {
- switch(row)
- {
- case 0:
- {
- SetPlayerPos(playerid,2492.4546,-1672.3051,13.3359);
- TogglePlayerControllable(playerid,1);
- SetPVarInt(playerid,"GutSkin",0);
- }
- case 1:
- {
- if(GetPVarInt(playerid,"GutSkin") == 0)
- {
- SetPlayerSkin(playerid,106);
- TogglePlayerControllable(playerid,0);
- ShowMenuForPlayer(GroveSkin,playerid);
- SetPVarInt(playerid,"GutSkin",1);
- }
- else if(GetPVarInt(playerid,"GutSkin") == 1)
- {
- SetPlayerSkin(playerid,107);
- TogglePlayerControllable(playerid,0);
- ShowMenuForPlayer(GroveSkin,playerid);
- SetPVarInt(playerid,"GutSkin",2);
- }
- else if(GetPVarInt(playerid,"GutSkin") == 2)
- {
- SetPlayerSkin(playerid,105);
- TogglePlayerControllable(playerid,0);
- ShowMenuForPlayer(GroveSkin,playerid);
- SetPVarInt(playerid,"GutSkin",0);
- }
- }
- }
- }
- 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,COLOR_RED,"Du hast den Login Vorgang abgebrochen!");
- Kick(playerid);
- return 1;
- }
- if(response == 1)
- {
- if(!strlen(inputtext))
- {
- SendClientMessage(playerid,COLOR_GREEN,"Dein eingegebenes Passwort war nicht lang genug!");
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Login","Ihr Account wurde in unserer Datenbank gefunden!\nBitte gib nun dein Passwort ein! ","Login", "Abbrechen");
- return 1;
- }
- else
- {
- Login(playerid,inputtext);
- return 1;
- }
- }
- }
- if(dialogid == DIALOG_REGISTER)
- {
- if(response == 0)
- {
- SendClientMessage(playerid,COLOR_RED,"Sie haben die Registrierung abgebrochen!");
- Kick(playerid);
- return 1;
- }
- if(response == 1)
- {
- if(!strlen(inputtext))
- {
- SendClientMessage(playerid,COLOR_GREEN,"Dein eingegebenes Passwort war nicht lang genug!");
- ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Registrierung auf AimLike","Willkommen auf DeinRL!\nBitte geben sie nun ihr gewünschtes Passwort ein","Register","Abbrechen");
- return 1;
- }
- else
- {
- Register(playerid,inputtext);
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- /* ===== Stocks ====== */
- stock Register(playerid,key[])
- {
- new pfad[128];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(pfad,sizeof(pfad),"/Spieler/%s.ini",name);
- dini_Create(pfad);
- dini_Set(pfad,"Passwort",key);
- dini_IntSet(pfad,"Admin",0);
- SetPVarInt(playerid,"Eingeloggt",1);
- SetPVarInt(playerid,"Neuling",1);
- SpawnPlayer(playerid);
- return 1;
- }
- stock Login(playerid,key[])
- {
- new pfad[128];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(pfad,sizeof(pfad),"/Accounts/%s.ini",name);
- if(!strcmp(key,dini_Get(pfad,"Passwort"),false))
- {
- AccountLaden(playerid);
- }
- else
- {
- SendClientMessage(playerid,COLOR_GREEN,"Du hast ein falsches Passwort eingegeben!");
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde in unserer Datenbank gefunden!\nBitte gib nun dein Passwort ein! ","Login", "Abbrechen");
- }
- return 1;
- }
- stock AccountLaden(playerid)
- {
- new pfad[128];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(pfad,sizeof(pfad),"/Accounts/%s.ini",name);
- Spieler[playerid][pLevel] = dini_Int(pfad,"Level");
- Spieler[playerid][pAdmin] = dini_Int(pfad,"Admin");
- Spieler[playerid][pSkin] = dini_Int(pfad,"Skin");
- Spieler[playerid][pGeld] = dini_Int(pfad,"Geld");
- Spieler[playerid][pBankgeld] = dini_Int(pfad,"Bankgeld");
- Spieler[playerid][pFraktion] = dini_Int(pfad,"Fraktion");
- Spieler[playerid][pLeader] = dini_Int(pfad,"Fraktion");
- Spieler[playerid][pName] = GetPlayerName(playerid,name,24);
- SetPVarInt(playerid,"Eingeloggt",1);
- return 1;
- }
- stock SpielerSpeichern(playerid)
- {
- if(GetPVarInt(playerid,"Eingeloggt") == 1)
- {
- new pfad[128];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(pfad,sizeof(pfad),"/Accounts/%s.ini",name);
- dini_IntSet(pfad,"Level", Spieler[playerid][pLevel]);
- dini_IntSet(pfad, "Admin", Spieler[playerid][pAdmin]);
- dini_IntSet(pfad, "Skin", GetPlayerSkin(playerid));
- dini_IntSet(pfad, "Geld", GetPlayerMoney(playerid));
- dini_IntSet(pfad, "Bankgeld", Spieler[playerid][pBankgeld]);
- dini_IntSet(pfad, "Fraktion", Spieler[playerid][pFraktion]);
- dini_IntSet(pfad, "Leader", Spieler[playerid][pLeader]);
- }
- }
- 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;
- }
- stock AdminRang(playerid)
- {
- new arang[132];
- switch(Spieler[playerid][pAdmin])
- {
- case 1: format(arang, sizeof arang,"Probe Supporter");
- case 2: format(arang, sizeof arang,"Supporter");
- case 3: format(arang, sizeof arang,"Moderator");
- case 1337: format(arang, sizeof arang,"Admin");
- case 1338: format(arang, sizeof arang,"Co Projektleiter");
- case 1339: format(arang, sizeof arang,"Serverleiter");
- }
- return arang;
- }
- stock FraktionsRang(playerid)
- {
- new arang[132];
- if(Spieler[playerid][pFraktion] == 1)
- {
- switch(Spieler[playerid][pRank])
- {
- case 1: format(arang, sizeof arang,"");
- case 2: format(arang, sizeof arang,"");
- case 3: format(arang, sizeof arang,"");
- case 4: format(arang, sizeof arang,"");
- case 5: format(arang, sizeof arang,"Co Boss");
- case 6: format(arang, sizeof arang,"Boss");
- }
- }
- else if(Spieler[playerid][pFraktion] == 2)
- {
- switch(Spieler[playerid][pRank])
- {
- case 1: format(arang, sizeof arang,"");
- case 2: format(arang, sizeof arang,"");
- case 3: format(arang, sizeof arang,"");
- case 4: format(arang, sizeof arang,"");
- case 5: format(arang, sizeof arang,"Co Boss");
- case 6: format(arang, sizeof arang,"Boss");
- }
- }
- return arang;
- }
- stock FraktionsName(playerid)
- {
- new Fraktion[132];
- switch(Spieler[playerid][pFraktion])
- {
- case 0: format(Fraktion, sizeof Fraktion,"Penner");
- case 1: format(Fraktion, sizeof Fraktion,"LCN");
- case 2: format(Fraktion, sizeof Fraktion,"Grove Street");
- }
- return Fraktion;
- }
- stock LeaderName(playerid)
- {
- new Fraktion[132];
- switch(Spieler[playerid][pFraktion])
- {
- case 0: format(Fraktion, sizeof Fraktion,"-");
- case 1: format(Fraktion, sizeof Fraktion,"LCN Leader");
- case 2: format(Fraktion, sizeof Fraktion,"Grove Street Leader");
- }
- return Fraktion;
- }
- /* ===== Timer ====== */
- forward Tutorial(playerid);
- public Tutorial(playerid)
- {
- TutTime[playerid] += 1;
- if(TutTime[playerid] == 1)
- {
- }
- }
- /* ===== Admin Commands ====== */
- // Rang 1 Probe Supporter
- /*CMD:ahelp(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1)
- {
- SendClientMessage(playerid,COLOR_RED," ----> Admincenter <----");
- SendClientMessage(playerid,COLOR_RED,"Befehle (1): /a(chat) /kick /gotospawn /gotogrove ");
- }
- if(Spieler[playerid][pAdmin] >= 2)
- {
- SendClientMessage(playerid,COLOR_RED,"Befehle (2): /setint /sethp ");
- }
- if(Spieler[playerid][pAdmin] >= 3)
- {
- SendClientMessage(playerid,COLOR_RED,"Befehle (3): /freeze /unfreeze ");
- }
- if(Spieler[playerid][pAdmin] >= 1337)
- {
- SendClientMessage(playerid,COLOR_RED,"Befehle (1337): /veh /givemoney");
- }
- if(Spieler[playerid][pAdmin] >= 1338)
- {
- SendClientMessage(playerid,COLOR_RED,"Befehle (1338): /setadmin /setleader ");
- }
- return 1;
- }
- CMD:a(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1)
- {
- new text[128],string[128];
- if(sscanf(params,"s",text)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /a(chat) [Nachricht]");
- format(string,sizeof string,"(( AdminChat %s %s : %s ))",AdminRang(playerid),Spieler[playerid][pName],text);
- for(new i;i<MAX_PLAYERS;i++)
- {
- if(Spieler[i][pAdmin])
- {
- SendClientMessage(i,0xFF2800FF,string);
- }
- }
- }
- return 1;
- }
- CMD:kick(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1)
- {
- new pID,Grund[55],string[123];
- if(sscanf(params,"us",pID,Grund)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /kick [playerid] [Grund]");
- format(string,sizeof(string),"%s wurde von %s %s gekickt, Grund: %s",Spieler[pID][pName],AdminRang(playerid),Spieler[playerid][pName],Grund);
- SendClientMessageToAll(COLOR_RED,string);
- Kick(pID);
- }
- return 1;
- }
- CMD:gotospawn(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1)
- {
- SetPlayerPos(playerid,-2765.1836,375.2714,6.3359);
- SetPlayerFacingAngle(playerid,269.5055);
- }
- return 1;
- }
- CMD:gotogrove(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1)
- {
- SetPlayerPos(playerid,2492.4546,-1672.3051,13.3359);
- SetPlayerFacingAngle(playerid,269.5055);
- }
- return 1;
- }
- // Rang 2
- CMD:setint(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 2)
- {
- new pID,string[123],intid;
- if(sscanf(params,"ui",pID,intid)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /setint [playerid] [Interiorid]");
- SetPlayerInterior(pID,intid);
- format(string,sizeof(string),"%s %s hat dein Interior auf %i gesetzt.",AdminRang(playerid),Spieler[playerid][pName],intid);
- SendClientMessage(playerid,COLOR_RED,string);
- SendClientMessage(pID,COLOR_RED,string);
- }
- return 1;
- }
- CMD:sethp(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 2)
- {
- new pID,string[123],intid;
- if(sscanf(params,"ui",pID,intid)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /sethp [playerid] [Health]");
- SetPlayerHealth(pID,intid);
- format(string,sizeof(string),"%s %s hat dein Leben auf %i gesetzt.",AdminRang(playerid),Spieler[playerid][pName],intid);
- SendClientMessage(playerid,COLOR_RED,string);
- SendClientMessage(pID,COLOR_RED,string);
- }
- return 1;
- }
- // Rang 3
- CMD:freeze(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 2)
- {
- new pID,string[123];
- if(sscanf(params,"u",pID)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /freeze [playerid]");
- TogglePlayerControllable(pID,0);
- format(string,sizeof(string),"%s %s hat dich gefreezet.",AdminRang(playerid),Spieler[playerid][pName]);
- SendClientMessage(playerid,COLOR_RED,string);
- SetCameraBehindPlayer(pID);
- SendClientMessage(pID,COLOR_RED,string);
- }
- return 1;
- }
- CMD:unfreeze(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 2)
- {
- new pID,string[123];
- if(sscanf(params,"u",pID)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /unfreeze [playerid]");
- TogglePlayerControllable(pID,1);
- format(string,sizeof(string),"%s %s hat dich entfreezet.",AdminRang(playerid),Spieler[playerid][pName]);
- SendClientMessage(playerid,COLOR_RED,string);
- SetCameraBehindPlayer(pID);
- SendClientMessage(pID,COLOR_RED,string);
- }
- return 1;
- }
- // Rang 1337
- CMD:veh(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1337)
- {
- new veh,Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- if(sscanf(params,"i",veh)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /veh [Vehicleid]");
- supmobil[playerid] = CreateVehicle(veh,X,Y,(Z)+2,69,1,1,30);
- PutPlayerInVehicle(playerid,supmobil[playerid],0);
- }
- return 1;
- }
- CMD:givemoney(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1337)
- {
- new pID,Betrag,string[123];
- if(sscanf(params,"ui",pID,Betrag)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /givemoney [playerid] [Betrag]");
- GivePlayerMoney(pID,Betrag);
- format(string,sizeof(string),"%s hat dir %i gegeben.",Spieler[playerid][pName],Betrag);
- SendClientMessage(playerid,COLOR_RED,string);
- SendClientMessage(pID,COLOR_RED,string);
- }
- return 1;
- }
- // Rang 1338
- CMD:setadmin(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1338 || IsPlayerAdmin(playerid))
- {
- new pID,rank,string[128];
- if(sscanf(params,"ui",pID,rank)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /setadmin [playerid] [Adminlevel]");
- format(string,sizeof(string),"%s wurde von %s %s zum Admin (%i) befördert.",Spieler[pID][pName],AdminRang(playerid),Spieler[playerid][pName],rank);
- SendClientMessageToAll(COLOR_RED,string);
- Spieler[pID][pAdmin] = rank;
- }
- return 1;
- }
- CMD:setleader(playerid,params[])
- {
- if(Spieler[playerid][pAdmin] >= 1338)
- {
- new pID,rank,string[128];
- if(sscanf(params,"ui",pID,rank)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /setleader [playerid] [Fraktionsid]");
- format(string,sizeof(string),"%s wurde von %s %s zum Leader (%i) gemacht.",Spieler[pID][pName],AdminRang(playerid),Spieler[playerid][pName],rank);
- SendClientMessageToAll(COLOR_RED,string);
- Spieler[pID][pLeader] = rank;
- Spieler[pID][pFraktion] = rank;
- Spieler[pID][pRank] = 6;
- if(rank == 0)
- {
- SetPlayerSkin(playerid,7);
- }
- if(rank == 1)
- {
- ShowMenuForPlayer(LCNSkin,playerid);
- SetPlayerPos(pID,-1977.9935,130.4027,36.9623);
- SetPlayerSkin(playerid,111);
- TogglePlayerControllable(playerid,0);
- }
- if(rank == 2)
- {
- ShowMenuForPlayer(GroveSkin,playerid);
- SetPlayerPos(pID,-1977.9935,130.4027,36.9623);
- SetPlayerSkin(playerid,105);
- TogglePlayerControllable(playerid,0);
- }
- }
- return 1;
- } */
- /* ===== User Commands ====== */
- /*CMD:o(playerid,params[])
- {
- new text[55],string[123];
- if(sscanf(params,"s",text)) return SendClientMessage(playerid,COLOR_GREY,"VERWENDUNG: /o(ochat) [Nachricht]");
- if(Spieler[playerid][pAdmin] != 0)
- {
- format(string,sizeof(string),"(( %s %s: %s ))",AdminRang(playerid),Spieler[playerid][pName],text);
- }
- else
- {
- format(string,sizeof(string),"(( %s: %s ))",Spieler[playerid][pName],text);
- }
- for(new i;i<MAX_PLAYERS;i++)
- {
- if(GetPVarInt(i,"Eingeloggt") == 1)
- {
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- return 1;
- } */
Advertisement
Add Comment
Please, Sign In to add comment