hallo
ich brauche hilfe bei ein und ausgänngen weil nur id0 rein kann und nicht id 1
ich danke für die bemühungen von euch
#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, 1116.1718,2719.0391,10.8203); // PD Eingang // kleiner gelber Trichter
CreatePickup(1559, 23, 390.0959,173.8525,1008.3828); // PD 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)
{
if (PlayerToPoint(1, playerid, 1116.1718,2719.0391,10.8203)) // PD Eingang // if (PlayerToPoint(Radius, playerid, Float:X, Float:Y, Float:Z)) // Wo der Spieler Stehen soll
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1519.7460,2773.3748,49.8788); // Wo der Spieler hin kommen soll
SetPlayerFacingAngle(playerid, 0.0);
}
else if (PlayerToPoint(1, playerid, 390.0959,173.8525,1008.3828)) // PD Ausgang
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1488.2343,-1771.1682,18.7958);
SetPlayerFacingAngle(playerid, 90.0);
}
return 1;
}