hallo hier können nur player 0 rein und player 1 , 2 ,3 .. nicht fehlt da was
#include <a_samp>
forward Ports(playerid);
new PortTimer;
#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(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
KillTimer(PortTimer);
CreatePickup(1318, 23, 1555.1205, -1675.6710, 16.1953); // PD Eingang // kleiner gelber Trichter
CreatePickup(1318, 23, 246.7282, 62.7136, 1003.6406); // PD Ausgang // Weißer Pfeil
CreatePickup(1318, 23, 1462.9381,-1012.6003,26.843; // bank Eingang // kleiner gelber Trichter
CreatePickup(1318, 23, 1414.951171,-988.971191,1639.980224); // bank Ausgang // Weißer Pfeil
CreatePickup(1318, 23, 1481.5283,-1770.7322,18.795; // stadthalle Eingang // kleiner gelber Trichter
CreatePickup(1318, 23, 387.808624,173.804992,1008.382812); // stadthalle Ausgang // Weißer Pfeil
PortTimer = SetTimer("Ports", 1000, 1);
DisableInteriorEnterExits();
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if (IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
public Ports(playerid)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if (PlayerToPoint(1, i, 1555.1205, -1675.6710, 16.1953)) // PD Eingang // if (PlayerToPoint(Radius, playerid, Float:X, Float:Y, Float:Z)) // Wo der Spieler Stehen soll
{
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid, 246.7840, 63.9002, 1003.6406); // Wo der Spieler hin kommen soll
SetPlayerFacingAngle(playerid, 0.0);
}
else if (PlayerToPoint(1, i, 246.7282, 62.7136, 1003.6406)) // PD Ausgang
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1552.4490, -1674.9897, 16.1953);
SetPlayerFacingAngle(playerid, 90.0);
}
{
if (PlayerToPoint(1, i, 1462.9381,-1012.6003,26.843) // bank Eingang // if (PlayerToPoint(Radius, playerid, Float:X, Float:Y, Float:Z)) // Wo der Spieler Stehen soll
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1415.951171,-988.971191,1639.980224); // Wo der Spieler hin kommen soll
SetPlayerFacingAngle(playerid, 0.0);
}
else if (PlayerToPoint(1, i, 1414.951171,-988.971191,1639.980224)) // bank Ausgang
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1441.5587,-1012.1306,26.843;
SetPlayerFacingAngle(playerid, 90.0);
}
{
if (PlayerToPoint(1, i, 1481.5283,-1770.7322,18.795) // PD Eingang // if (PlayerToPoint(Radius, playerid, Float:X, Float:Y, Float:Z)) // Wo der Spieler Stehen soll
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); // Wo der Spieler hin kommen soll
SetPlayerFacingAngle(playerid, 0.0);
}
else if (PlayerToPoint(1, i, 387.808624,173.804992,1008.382812)) // PD Ausgang
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1488.5283,-1770.7322,18.795;
SetPlayerFacingAngle(playerid, 90.0);
}
}
}
return 1;
}
}