Hiho, ich hab mich mal an einem Script versucht.. jedoch habe ich viele Fehler , kann sie mir jemand zeigen, ich weiß nicht was ich falsch gemacht habe.
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" GTA-DM by cRy");
print("----------------------------------\n");
}
#endif
public OnFilterScriptInit()//Hier kommt rein, was passieren soll, wenn der Filterscript geladen wird (Dazu musst du ihn als FS definieren).
{
print("\n--------------------------------------");
print(" Own FIlterscript");
print("--------------------------------------\n");
return 1;
public OnFilterScriptExit()
{
return 1;
}
main()
print("\n----------------------------------");
print(" SA RL/DM");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("SA RL/DM");
AddPlayerClass( 168, -773.369628, 2086.594970, 60.382812, 216.212066, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
print("GameMode exited!");
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
GivePlayerWeapon(playerid, 353, 500);
GivePlayerWeapon(playerid, 356, 500);
SendPlayerMessageToPlayer(playerid, "Welcome ;) HF & GL");
return 1;
}
public OnPlayerConnect(playerid)//Das passiert wenn jemand den Server betritt
{
GivePlayerMoney(playerid, 1000);//1000 ist das Startgeld
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string/*Willkommen*/, sizeof(string)"%s joined the server"/*Willkommen*/, name/*Du bist dem Server gejoint*/);
SendClientMessageToAll(0x00FF00FF, string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
switch(reason) {
case 0: format(string, sizeof(string), "%s hat den Server verlassen: Timeout", name);
case 1: format(string, sizeof(string), "%s hat den Server verlassen: Leaving", name);
case 2: format(string, sizeof(string), "%s hat den Server verlassen: Kicked/banned", name);
}
SendClientMessageToAll(0x00FF00FF, string);//Wir senden die Message
return 1;
}
public OnPlayerSpawn(playerid)
{
SendPlayerMessageToPlayer("Du bist gestorben")
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/weapons", /weapons, true, 10) == 0)
{
GivePlayerWeapon(535, 500)
return 1;
}
return 0;
}
DANKE !