Guten Morgen Breadfish
Ich weiß nicht ob so etwas schon gemacht wurde.
Ich habe ein Kleines Haiangriff filterscript geschrieben es ist nichts tolles.
Es wurde mit mit ein DynamicCube gemacht so das es ein Würfel entsteht wo der Haiangriff statt findet.
Hier der Code:
Code
#include <a_samp>
#include<streamer>
forward Haiangriff(playerid);
forward Haitimer();
new haiarena, IstSpielerInHaiArena[MAX_PLAYERS];
//_________________
#define rot 0xFF0000FF
//_________________
main()
{
}
public OnGameModeInit()
{
haiarena = CreateDynamicCube(4522.32373,-1011.49768,-2,4531.14404,-1027.95825, 2);
CreateDynamicObject(1608, 4522.32373, -1011.49768, -0.78810, 0.00000, 0.00000, 181.70970);
CreateDynamicObject(1608, 4531.12793, -1011.49768, -0.78810, 0.00000, 0.00000, 181.70970);
CreateDynamicObject(1608, 4531.14404, -1027.95825, -0.78810, 0.00000, 0.00000, 181.70970);
CreateDynamicObject(1608, 4522.32373, -1027.95825, -0.78810, 0.00000, 0.00000, 181.70970);
SetTimer("Haitimer", 1000,true);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
IstSpielerInHaiArena[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
return 1;
}
public Haitimer()
{
for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerInDynamicArea(playerid,haiarena,0) && IstSpielerInHaiArena[playerid] == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
PlayAudioStreamForPlayer(playerid,"http://img.xperia-hosting.de/Hai.mp3");
SendClientMessage(playerid,rot,"ACHTUNG! ACHTUNG!");
SetTimerEx("Haiangriff", 1000*69,false,"d", playerid);
IstSpielerInHaiArena[playerid] = 1;
}
}
}
return 1;
}
public Haiangriff(playerid)
{
SendClientMessage(playerid,rot, "Du wurdest duch einen Hai angriff getötet!");
SetPlayerHealth(playerid,0);
IstSpielerInHaiArena[playerid] = 0;
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)
{
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[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Alles anzeigen