Hallo Community,
ich habe mir mal aus FUN ein DM Script für paar Kollegen als Homeserver geladen.
Naya es funktioniert alles außer der Befehl exit.
Hier ist der ocmd:
ocmd:exit(playerid,params[])
{
if(GetPVarInt(playerid,"Duellieren")==0)return SendClientMessage(playerid,ROT,"FEHLER:Sie befinden sich in keiner Duel/Durby Arena.");
{
if(GetPVarInt(playerid,"DeagleDuel")==1)
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1310.1202,-1371.4332,13.5886);
SetPVarInt(playerid,"Duellieren",0);
SetPVarInt(playerid,"DeagleDuel",0);
new aname[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "{30FF56}%s {FFFFFF}hat die Deagle Arena {FF0000}verlassen!",aname);
SendClientMessageToAll(WEISS,string);
SetPVarInt(playerid,"Killstreak",0);
}
else if(GetPVarInt(playerid,"MP5Duel")==1)
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1310.1202,-1371.4332,13.5886);
SetPVarInt(playerid,"Duellieren",0);
SetPVarInt(playerid,"MP5Duel",0);
new aname[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "{30FF56}%s {FFFFFF}hat die MP5 Arena {FF0000}verlassen!",aname);
SendClientMessageToAll(WEISS,string);
SetPVarInt(playerid,"Killstreak",0);
}
else if(GetPVarInt(playerid,"AK47Duel")==1)
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1310.1202,-1371.4332,13.5886);
SetPVarInt(playerid,"Duellieren",0);
SetPVarInt(playerid,"AK47Duel",0);
new aname[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "{30FF56}%s {FFFFFF}hat die AK47 + Deagle Arena {FF0000}verlassen!",aname);
SendClientMessageToAll(WEISS,string);
SetPVarInt(playerid,"Killstreak",0);
}
/*else if(GetPVarInt(playerid,"M4A1Duel")==1)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,0,0);
SetPlayerPos(playerid,1310.1202,-1371.4332,13.5886);
SetPVarInt(playerid,"Duellieren",0);
SetPVarInt(playerid,"M4A1Duel",0);
new aname[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "{30FF56}%s {FFFFFF}hat die M4A1 + Deagle Arena {FF0000}verlassen!",aname);
SendClientMessageToAll(WEISS,string);
}*/
else if(GetPVarInt(playerid,"DurbyArena")==1)
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1310.1202,-1371.4332,13.5886);
SetPVarInt(playerid,"DurbyArena",0);
SetPVarInt(playerid,"Duellieren",0);
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"{FF806A}[DURBY:]{00FF00}%s {FFFFFF}hat die {00FF00}Durby Arena One {FFFFFF}verlassen.",name);
SendClientMessageToAll(WEISS,string);
SetPVarInt(playerid,"Killstreak",0);
}
else if(GetPVarInt(playerid,"DurbyArena2")==1)
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1310.1202,-1371.4332,13.5886);
SetPlayerInterior(playerid,0);
SetPVarInt(playerid,"DurbyArena2",0);
SetPVarInt(playerid,"Duellieren",0);
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"{FF806A}[DURBY:]{00FF00}%s {FFFFFF}hat die {00FF00}Durby Arena Two {FFFFFF}verlassen.",name);
SendClientMessageToAll(WEISS,string);
SetPVarInt(playerid,"Killstreak",0);
}
}
return 1;
}