Kann mir einer das schnell fertig Scripten das man das tor nur zu/auf bekommt wenn man ca 3 Meter davorsteht?? und vllt Makieren was geändert wurde damit ich weiß wie es geht xD
#include <a_samp>
new beispiel_Gate;
// 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(" Kartbahn von Bart");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
beispiel_Gate = CreateObject(980, 1245.454712, -766.847351, 93.887329, 0.0000, 0.0000, 0.0000);
// Don't use these lines if it's a filterscript
SetGameModeText("Kartbahn von Bart");
AddPlayerClass(115, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
CreateObject(7304, 1099.024170, 1271.167358, 12.708544, 0.0000, 0.0000, 180.0000);
CreateObject(8292, 1176.105713, 1262.228760, 13.225658, 0.0000, 0.0000, 146.2501);
CreateObject(982, 1137.196289, 1345.667358, 10.503867, 0.0000, 0.0000, 270.0000);
CreateObject(983, 1149.950073, 1342.482910, 10.503867, 0.0000, 0.0000, 0.0000);
CreateObject(982, 1162.777954, 1339.279541, 10.496072, 0.0000, 0.0000, 270.0000);
return 1;
}
public OnGameModeExit()
{
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)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/open", true) == 0)
if (isPlayertoPoint(7,1245.454712, -766.847351, 93.887329,4)}
{
MoveObject(beispiel_Gate,1245.477783, -766.830872, 99.441406,4);
return 1;
}
if (strcmp(cmdtext, "/close", true) == 0){
MoveObject(beispiel_Gate, 1245.454712, -766.847351, 93.887329,4);
return 1;
}
return 0;
}
public OnPlayerInfoChange(playerid)
{
return 1;
}
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 OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}