/exit befehl brauch ich auch für raus gehen von dm
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_TEMP 0xFFFFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_DARKGREEN 0x00721CFF
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF8000FF
#define COLOR_CREAM 0xF8BD6DFF
#define COLOR_SILVER 0xC0C0C0FF
#define COLOR_TEAL 0x00FFFFFF
#define COLOR_BERG 0x804040FF
#define COLOR_PINK 0xFF66FFAA
#define COLOR_SPEW 0x808040FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_PURPLE 0x400080FF
#define COLOR_COPPER 0x804000FF
#define COLOR_RAREZ 0x06A7B9FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_DARKRED 0xAA3333AA
#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
#if defined FILTERSCRIPT
new string[256];
new string4[64];
//Variablen
new IsPlayerInDM[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Filterscript (Commands");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print("Filterscript (Commands");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
IsPlayerInDM[playerid]=0;
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
new IsPlayerInDM
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(resetweapons,12,cmdtext);
if (strcmp("/commands", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_RED,"Alle Commands:");
SendClientMessage(playerid,COLOR_RED,"/kill (fur Selbstmord)");
SendClientMessage(playerid,COLOR_RED,"/lock , /unlock (fuer Auto , Bike usw.)");
SendClientMessage(playerid,COLOR_RED,"/schirm");
SendClientMessage(playerid,COLOR_RED,"/dm1 - /dm6 , /credits");
return 1;
}
if (strcmp("/credits", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_RED,"");
return 1;
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,100.00);
SendClientMessage(playerid,COLOR_RED,"Du hast dich geheilt!");
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,COLOR_RED,"Selbstmord ist keine Losung, aber ein Ausweg!");
return 1;
}
if(strcmp(cmdtext, "/buyarmour", true) == 0 || strcmp(cmdtext, "/ba", true) == 0)
{
if (GetPlayerMoney(playerid) > 1250)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s hat sich Armour gekauft! (/buyarmour)", name);
SendClientMessageToAll(0xAA3333AA, string);
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid, -1000);
SendClientMessage(playerid,0x33AA33AA,"Du hast dir fur 1000$ Armour gekauft.");
}
else
{
SendClientMessage(playerid,0xAA3333AA,"Du hast nicht genugend Geld!");
}
return 1;
}
if (strcmp("/zu", cmdtext, true, 10) == 0)
{
if (GetPlayerState(playerid) == 2)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (i != playerid) SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
}
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, "Auto abgeschlossen!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du fahrst das Auto nicht!");
}
return 1;
}
if (strcmp("/auf", cmdtext, true, 10) == 0)
{
if (GetPlayerState(playerid) == 2)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (i != playerid) SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 0);
}
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, "Auto aufgeschlossen!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du fahrst das Auto nicht!");
}
return 1;
}
if (strcmp(cmdtext, "/schirm", true)==0)
{
GivePlayerWeapon(playerid, 46, 1);
SendClientMessage(playerid,COLOR_RED,"Du hast einen Fallschirm erhalten!");
return 1;
}
if(strcmp(cmdtext,"/fixcar",true) == 0)
{
SendClientMessage(playerid,COLOR_GREEN,"Auto repariert!");
SetVehicleHealth(GetPlayerVehicleID(playerid),1250.0);
return 1;
}
if (strcmp("/backcar", cmdtext, true, 5) == 0)
{
if (IsPlayerInAnyVehicle(playerid))
{
new veh = GetPlayerVehicleID(playerid); SetVehicleToRespawn(veh);
SendClientMessage(playerid, COLOR_GREEN, "Auto zur Spawnposition zuruck gesetzt!");
return 1;
}
}
if(strcmp(cmdtext,"/dm1",true)==0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[DEATHMATCH] %s ist der DM1 beigetreten! (/dm1)", name);
SendClientMessageToAll(0xAA3333AA, string);
SetPlayerPos(playerid,-2119.2554,-194.4700,35.3203);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"Willkommen zur Deathmathzone 1",4000,6);
GivePlayerWeapon(playerid, 24, 4000);
GivePlayerWeapon(playerid, 25, 4000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 000.0);
IsPlayerInDM[playerid]=1;
return 1;
}
if(strcmp(cmdtext,"/dm2",true)==0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[DEATHMATCH] %s ist der DM2 beigetreten! (/dm2)", name);
SendClientMessageToAll(0xAA3333AA, string);
SetPlayerPos(playerid,1383.6771,2185.6121,11.0234);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"Willkommen zur Deathmatchzone 2",4000,6);
GivePlayerWeapon(playerid, 0, 0000);
GivePlayerWeapon(playerid, 26, 4000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 000.0);
IsPlayerInDM[playerid]=1;
return 1;
}
if(strcmp(cmdtext,"/dm3",true)==0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[DEATHMATCH] %s ist der DM3 beigetreten! (/dm3)", name);
SendClientMessageToAll(0xAA3333AA, string);
SetPlayerPos(playerid,1607.8909,1682.6598,23.9988);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"Willkommen zur Deathmatchzone 3",4000,6);
GivePlayerWeapon(playerid, 0, 0000);
GivePlayerWeapon(playerid, 5, 0000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 000.0);
IsPlayerInDM[playerid]=1;
return 1;
}
if(strcmp(cmdtext,"/dm4",true)==0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[DEATHMATCH] %s ist der DM4 beigetreten! (/dm4)", name);
SendClientMessageToAll(0xAA3333AA, string);
SetPlayerPos(playerid,1680.1395,1679.6466,23.9475);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"Willkommen zur AK 47 Deathmatchzone 4",4000,6);
GivePlayerWeapon(playerid, 31, 4000);
GivePlayerWeapon(playerid, 30, 4000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 000.0);
IsPlayerInDM[playerid]=1;
return 1;
}
if(strcmp(cmdtext,"/dm5",true)==0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[DEATHMATCH] %s ist der DM5 beigetreten! (/dm5)", name);
SendClientMessageToAll(0xAA3333AA, string);
SetPlayerPos(playerid,1605.5768,1769.1742,38.2314);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"Willkommen zur Deathmatchzone 5",4000,6);
GivePlayerWeapon(playerid, 0, 0000);
GivePlayerWeapon(playerid, 0, 0000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 000.0);
IsPlayerInDM[playerid]=1;
return 1;
}
return 0;
}
dcmd_resetweapons(playerid, params[])
{
new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
new playa = strval(params);
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_RED,"Tippe: /waffenweg [ID]");
return 1;
}
if(IsPlayerConnected(playa))
{
if(IsPlayerAdmin(playerid))
{
ResetPlayerWeapons(playa);
GetPlayerName(playerid, name, sizeof name);
GetPlayerName(playa,name2, sizeof name2);
format(string,sizeof string, "%s hat deine Waffen geloscht!",name);
SendClientMessage(playa,COLOR_RED,string);
format(string4,sizeof string4,"Du hast %s Waffen entfernt!",name2);
SendClientMessage(playerid,COLOR_RED,string4);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"Du bist kein Rcon-Administrator!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Player ist nicht online");
return 1;
}
}
public OnPlayerInfoChange(playerid)
{
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 OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}