interior help
#1

Hello guys im making a new pilots server but i cant get this script to work

Code:
#include <a_samp>

#define COLOR_RED 0xFF6A6AFF

new IsInNev[MAX_PLAYERS];
new IsInAndrom[MAX_PLAYERS];
new IsInShamal[MAX_PLAYERS];
new Timer1[MAX_PLAYERS];
new Timer2[MAX_PLAYERS];

#pragma tabsize 0

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)
{
        IsInNev[playerid] = 0;
        IsInAndrom[playerid] = 0;
        IsInShamal[playerid] = 0;
        SendClientMessage(playerid, 0x003EFF, "This Server Uses S1k's Nevada Interior");
        return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
       	if (newkeys == 16 && IsInAndrom[playerid] > 0)
		{
				new Float:X,Float:Y,Float:Z;
				GetVehiclePos(IsInAndrom[playerid], X, Y, Z);
				SetPlayerPos(playerid, X+4, Y, Z);
				SetPlayerInterior(playerid, 0);
				KillTimer(Timer1[playerid]);
				KillTimer(Timer2[playerid]);
				IsInAndrom[playerid] = 0;
		}
		if (newkeys == 16 && IsInShamal[playerid] > 0)
		{
		new Float:X,Float:Y,Float:Z;
		GetVehiclePos(IsInShamal[playerid], X, Y, Z);
		SetPlayerPos(playerid, X+4, Y, Z);
		SetPlayerInterior(playerid, 0);
		KillTimer(Timer1[playerid]);
		KillTimer(Timer2[playerid]);
		IsInShamal[playerid] = 0;
		}
        if (newkeys == 16 && IsInNev[playerid] > 0)
        {
                new Float:X,Float:Y,Float:Z;
                GetVehiclePos(IsInNev[playerid], X, Y, Z);
                SetPlayerPos(playerid, X+4, Y, Z);
                SetPlayerInterior(playerid, 0);
                KillTimer(Timer1[playerid]);
                KillTimer(Timer2[playerid]);
                IsInNev[playerid] = 0;
        }
        return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        IsInNev[playerid] = 0;
        IsInAndrom[playerid] = 0;
        IsInShamal[playerid] = 0;
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
        IsInNev[playerid] = 0;
        IsInAndrom[playerid] = 0;
        IsInShamal[playerid] = 0;
        return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(GetVehicleModel(vehicleid) == 553 && ispassenger == 1)
	{
            SetPlayerPos(playerid, 2468.996582, -2941.314209, 7.562979);
            SetPlayerFacingAngle(playerid, 0);
            SetCameraBehindPlayer(playerid);
            SetPlayerInterior(playerid, 1);
            Timer1[playerid] = SetTimerEx("HornA", 60000, 1, "i", playerid);
            Timer2[playerid] = SetTimerEx("HornB", 60500, 1, "i", playerid);
 			IsInNev[playerid] = vehicleid;
	}
	return 0;
}
line 138 >>	if(GetVehicleModel(vehicleid) == 592 && ispassenger == 1)
	{
		    SetPlayerPos(playerid, 315.48, 984.13, 1959.11);
		    SetPlayerFacingAngle(playerid, 0);
            SetCameraBehindPlayer(playerid);
		    SetPlayerInterior(playerid, 9);
            Timer1[playerid] = SetTimerEx("HornA", 60000, 1, "i", playerid);
            Timer2[playerid] = SetTimerEx("HornB", 60500, 1, "i", playerid);
	        IsInAndrom[playerid] = vehicleid;
	}
line 148 >>	return 0;
}
line 150 >>	if(GetVehicleModel(vehicleid) == 419 && ispassenger == 1)
	{
		    SetPlayerPos(playerid, 315.48, 984.13, 1959.11);
		    SetPlayerFacingAngle(playerid, 0);
            SetCameraBehindPlayer(playerid);
		    SetPlayerInterior(playerid, 9);
            Timer1[playerid] = SetTimerEx("HornA", 60000, 1, "i", playerid);
            Timer2[playerid] = SetTimerEx("HornB", 60500, 1, "i", playerid);
	        IsInAndrom[playerid] = vehicleid;
	}
line 160 >>	return 0;
}
All the things to do with the nev / nevada work fine but when i add the androm interior and the Shamal Interior i get these errors
Code:
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(138) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(148) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(150) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(160) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Can someone help me with this i need this for my pilots server



Ok i also have a second code it works but how can i put in fuel stations

Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
new fuel[MAX_VEHICLES]; //fuel per vehicle
forward timer_fuel_lower(); //timer for lowering the fuel value
forward timer_refuel(playerid); //timer to refuel vehicle
new isrefuelling[MAX_PLAYERS] = 0; //bool to check if player is already refuelling
new Text:td_fuel[MAX_PLAYERS]; //textdraw with fuel
#define Yellow 0xFFFF00AA

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Fuel System by Zoe Loaded!!");
	print("--------------------------------------\n");
	for(new i=0;i<MAX_VEHICLES;i++) {
      fuel[i] = 100; //sets every car's fuel to 100 in a loop
    }
    SetTimer("timer_fuel_lower",4200,true); //sets the timer to drop the fuel
	return 1;
}

public OnPlayerSpawn(playerid)
{
    td_fuel[playerid] = TextDrawCreate(45,324,"Fuel: 100"); //create the textdraw at position
    TextDrawBackgroundColor(td_fuel[playerid],0x00000033); //setting an nice backgroundcolor
    TextDrawFont(td_fuel[playerid],3); //font type of textdraw
    TextDrawLetterSize(td_fuel[playerid],0.699999,1.700000); //size...
    TextDrawColor(td_fuel[playerid],0x000000ff); //color
    TextDrawSetShadow(td_fuel[playerid],3); //dropping the shadow
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/refuel",cmdtext,true,7)) {
        if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in an vehicle!"); //if a player isnt in a vehicle, it stops here
        if (isrefuelling[playerid]) return SendClientMessage(playerid,0xFFC800FF,"You are already refuelling!"); //if a player is already refuelling, it stops here
        if (GetPlayerMoney(playerid) - 80 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!"); //if a player doesnt have $80 anymore, it stops here
        GivePlayerMoney(playerid,-80); //Sets the player's cash -$80
        SetCameraBehindPlayer(playerid); //Sets the camera behind the player (looks better because the player will be frozen for a few secs)
        TogglePlayerControllable(playerid,0); //freezes the player so he cant drive and refuel at the same time
        isrefuelling[playerid] = 1; //setting isrefuelling to 1 so the player cant spam /refuel
        TextDrawSetString(td_fuel[playerid],"Refuelling..."); //changing textdraw to /refuel
        SetTimerEx("timer_refuel",4500,false,"i",playerid); //setting refueltimer
        return 1;
    }

    return 0;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        new vid = GetPlayerVehicleID(playerid);
        new string[125];format(string,sizeof string,"Fuel:%i",fuel[vid]); //quickly doing a small update on fuel (so it wont jump from 100 to its real value)
        TextDrawSetString(td_fuel[playerid],string);
        TextDrawShowForPlayer(playerid,td_fuel[playerid]); //showing if an player is a driver or passenger of the ar
    } else {
        TextDrawHideForPlayer(playerid,td_fuel[playerid]); //hiding if a player isnt driving/or an passenger
    }
    return 1;
}

public timer_fuel_lower()
{
    for(new i=0;i<MAX_PLAYERS;i++) { //loop for all players
        if (isrefuelling[i]) continue; //stop when a player is already refuelling
        new vid = GetPlayerVehicleID(i); //getting vehicle ID
        if (GetPlayerVehicleSeat(i) == 0) { //if the player is a driver (it should only lower the fuel when theres an driver!)
            fuel[vid] = fuel[vid] -1; //lowering fuel value
            if (fuel[vid]<1) //if fuel is empty
            {
                fuel[vid] = 0; //setting fuel to 0 (else the timer will set it to -1 -2 -3 etc before removing player)
                RemovePlayerFromVehicle(i); //remove player out of vehicle
                GameTextForPlayer(i,"~r~You are out of ~w~fuel~r~!",5000,4); //show text
            }
        }
        new string[125];format(string,sizeof string,"Fuel:%i",fuel[vid]); //preparing string with next fuel value
        TextDrawSetString(td_fuel[i],string); //updating textdraw
    }
    return 1;
}

public timer_refuel(playerid)
{
    new vid = GetPlayerVehicleID(playerid);
    fuel[vid] = fuel[vid] = 100; //restoring fuel to 100
    isrefuelling[playerid] = 0;//resetting anti-spam thingy :3
    TextDrawSetString(td_fuel[playerid],"Fuel:100"); //small update on textdraw
    TogglePlayerControllable(playerid,1); //unfreeze player
}
All i need is fuel stations and airport fuel stations please help

Regards
[Nuclear]Phoebe
Reply
#2

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;
}
Reply
#3

Code:
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(113) : error 017: undefined symbol "ShamalInt"
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(114) : error 017: undefined symbol "ShamalX"
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(117) : error 017: undefined symbol "NevadaInt"
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(118) : error 017: undefined symbol "NevadaX"
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(121) : error 017: undefined symbol "AndromInt"
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\test.pwn(122) : error 017: undefined symbol "AndromX"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#4

Replace to Your own coords
Reply
#5

thanks it works now
Reply
#6

but can u help me with my fuel system i put in at the top please
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)