22.08.2011, 20:12
Better Version :P
pawn Code:
#include <a_samp>
#define COLOR_RED 0xFF6A6AFF
new IsInPlane[MAX_PLAYERS];
new Timer1[MAX_PLAYERS];
new Timer2[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(" ===== New Nevada Plane Interior By S1k Loaded Sucessfully! =======");
CreateObject(3983, 2469.629150, -2919.871094, 8.278376, 0.0000, 0.0000, 0.0000);
CreateObject(944, 2473.229248, -2946.492432, 7.139725, 0.0000, 0.0000, 270.0000);
CreateObject(944, 2473.292236, -2946.488770, 8.585608, 0.0000, 0.0000, 270.0000);
CreateObject(964, 2471.891846, -2945.690186, 6.254938, 0.0000, 0.0000, 180.0000);
CreateObject(931, 2471.147461, -2947.244629, 7.316843, 0.0000, 0.0000, 0.0000);
CreateObject(1271, 2471.712646, -2946.877197, 7.922562, 0.0000, 0.0000, 0.0000);
CreateObject(1271, 2470.625732, -2945.544189, 6.613726, 0.0000, 0.0000, 0.0000);
CreateObject(1271, 2472.054932, -2946.875244, 8.737639, 0.0000, 0.0000, 0.0000);
CreateObject(1271, 2472.056885, -2946.107178, 7.570676, 0.0000, 0.0000, 0.0000);
CreateObject(1271, 2470.611572, -2945.521240, 7.312428, 0.0000, 0.0000, 0.0000);
CreateObject(1271, 2470.595947, -2946.877197, 7.921617, 0.0000, 0.0000, 0.0000);
CreateObject(14548, 2472.750244, -2945.020264, 8.406580, 12.8916, 0.0000, 0.0000);
CreateObject(964, 2474.609131, -2945.771240, 6.407874, 0.0000, 0.0000, 0.0000);
CreateObject(964, 2474.610596, -2946.862793, 6.409838, 0.0000, 0.0000, 180.0000);
CreateObject(1685, 2469.227783, -2945.027100, 7.156536, 0.0000, 0.0000, 0.0000);
CreateObject(1431, 2468.566650, -2942.016602, 6.948733, 0.0000, 0.0000, 270.0000);
CreateObject(1431, 2474.366211, -2946.001709, 7.921226, 0.0000, 0.0000, 270.0000);
CreateObject(1431, 2474.345459, -2945.954590, 8.426396, 0.0000, 0.0000, 270.0000);
CreateObject(1431, 2474.378174, -2945.846924, 8.931562, 0.0000, 0.0000, 270.0000);
CreateObject(1431, 2474.369385, -2945.933350, 9.834582, 0.0000, 0.0000, 270.0000);
CreateObject(1271, 2474.386230, -2945.187500, 9.286991, 0.0000, 0.0000, 0.0000);
CreateObject(2567, 2473.761963, -2944.838379, 8.329632, 0.0000, 0.0000, 270.0000);
CreateObject(2567, 2473.796387, -2940.026367, 8.325142, 0.0000, 0.0000, 270.0000);
CreateObject(2567, 2473.699707, -2935.200928, 8.316462, 0.0000, 0.0000, 270.0000);
CreateObject(2567, 2473.759033, -2930.333252, 8.307705, 0.0000, 0.0000, 270.0000);
CreateObject(2567, 2470.662354, -2930.452881, 8.307920, 0.0000, 0.0000, 0.0000);
CreateObject(1431, 2468.531250, -2939.992432, 6.945092, 0.0000, 0.0000, 270.0000);
CreateObject(1431, 2468.501709, -2938.042969, 6.941586, 0.0000, 0.0000, 270.0000);
CreateObject(1431, 2468.498779, -2936.026855, 6.937959, 0.0000, 0.0000, 90.0000);
CreateObject(1431, 2468.518066, -2934.179443, 6.934636, 0.0000, 0.0000, 270.0000);
CreateObject(1431, 2468.678223, -2932.426270, 6.931481, 0.0000, 0.0000, 258.7500);
CreateObject(927, 2470.650391, -2946.379150, 9.311947, 0.0000, 0.0000, 180.0000);
CreateObject(943, 2472.903320, -2934.670654, 7.175140, 0.0000, 0.0000, 180.0000);
CreateObject(1535, 2470.270996, -2931.557861, 6.296233, 0.0000, 0.0000, 0.0000);
CreateObject(2634, 2472.766113, -2941.141602, 7.668908, 0.0000, 0.0000, 90.0000);
CreateObject(2373, 2468.896973, -2940.247314, 6.023496, 0.0000, 0.0000, 270.0000);
CreateObject(2399, 2468.996582, -2941.314209, 7.562979, 0.0000, 0.0000, 78.7500);
return 1;
}
public OnFilterScriptExit()
{
print(" ===== New Nevada Plane Interior By S1k Unloaded Sucessfully! ======");
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0x003EFF, "This Server Uses S1k's Nevada Interior");
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & 16) && (IsInPlane[playerid]))
{
new Float:X,Float:Y,Float:Z;
GetVehiclePos(IsInPlane[playerid], X, Y, Z);
SetPlayerPos(playerid, X+4, Y, Z);
SetPlayerInterior(playerid, 0);
KillTimer(Timer1[playerid]);
KillTimer(Timer2[playerid]);
IsInPlane[playerid] = 0;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsInPlane[playerid])
{
KillTimer(Timer1[playerid]);
KillTimer(Timer2[playerid]);
IsInPlane[playerid] = 0;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(IsInPlane[playerid])
{
KillTimer(Timer1[playerid]);
KillTimer(Timer2[playerid]);
IsInPlane[playerid] = 0;
}
return 1;
}
/*592 - androm
553 - nevada
519 - shamal*/
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Model = GetVehicleModel(vehicleid);
if((Model == 519 || Model == 553 || Model == 592) && ispassenger)
{
switch(Model)
{
case 519: {
SetPlayerInterior(playerid, ShamalInt);
SetPlayerPos(playerid, ShamalX, ShamalY, ShamalZ);
}
case 553: {
SetPlayerInterior(playerid, NevadaInt);
SetPlayerPos(playerid, NevadaX, NevadaY, NevadaZ);
}
case 592: {
SetPlayerInterior(playerid, AndromInt);
SetPlayerPos(playerid, AndromX, AndromY, AndromZ);
}
}
SetPlayerFacingAngle(playerid, 0);
SetCameraBehindPlayer(playerid);
Timer1[playerid] = SetTimerEx("HornA", 60000, 1, "i", playerid);
Timer2[playerid] = SetTimerEx("HornB", 60500, 1, "i", playerid);
IsInPlane[playerid] = vehicleid;
return 1;
}
return 1;
}