Hallo habe ein dm script aber der spieler kan sich da rausteleportieren , und hat die waffen wie mach ichs damit er net die dm verlassen kann
#include <a_samp>
#if defined FILTERSCRIPT
#define COLOR_GREY 0xAFAFAFAA
public OnFilterScriptInit()
{
UsePlayerPedAnims();
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
}
#endif
public OnGameModeInit()
{
UsePlayerPedAnims();
}
public OnPlayerCommandText(playerid,cmdtext[])
{
if (strcmp(cmdtext, "/dm", true) == 0) {
SetPlayerPos(playerid,1307.397949, 2108.698730, 11.015625);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,5000);
GivePlayerWeapon(playerid,28,5000);
GivePlayerWeapon(playerid,31,5000);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s hat die /dm betreten !", name);
SendClientMessageToAll(0xAFAFAFAA, string);
SendClientMessage(playerid, 0xAFAFAFAA,"Schreibe /exit um DM zu verlassen !");
return 1;
}
else if (strcmp(cmdtext, "/exit", true)==0)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,2466.930664, -1660.438720, 13.277129);
return 1;
}
return 0;
}