SA-MP Forums Archive
How to add cars in FS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to add cars in FS (/showthread.php?tid=69740)



How to add cars in FS - djdanni - 20.03.2009

hi i have a FS but i am woondering hwo i can add a cars in to FS?
http://pawn.pastebin.com/f8208bde
This is my FS abd at the buttom there are car's i wan to add.
Dose anyone there who know hwo to do that?


Re: How to add cars in FS - weedarr - 20.03.2009

Just under where you put the objects in. Make sure they dont go over the limits, e.g. gamemode cars and filterscript cars dont go over limit.

WeeDarr


Re: How to add cars in FS - djdanni - 20.03.2009

i know i am finnishing one first. But i have already try that but seems to be not woorking


Re: How to add cars in FS - djdanni - 20.03.2009

Nope i get error. the game just close.


Re: How to add cars in FS - djdanni - 20.03.2009

I am using my copy of lv thang


Re: How to add cars in FS - djdanni - 20.03.2009

It have
67 Objects
23 cars
no pickups


Re: How to add cars in FS - djdanni - 20.03.2009

When i have it not loaded it dose not crash and also if i take the car's off it also woork.


Re: How to add cars in FS - djdanni - 20.03.2009

I don't know how to do that
Newer mind i give up.


Re: How to add cars in FS - Kinetic - 20.03.2009

Quote:
Originally Posted by djdanni
I don't know how to do that
Newer mind i give up.
Thats the spirit!...
naw just kiddin.

You are putting the vehicle spawns in the wrong spot and this works below.

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" D Stunt Loded");
    print("--------------------------------------\n");

    CreateObject(8357, 2131.144287, 538.815918, 6.809181, 0.000000, 0.000000, -89.999981);
    CreateObject(8357, 2131.170898, 507.988464, 6.820731, 0.000000, 0.000000, -89.999981);
    CreateObject(8357, 2131.165771, 477.169556, 6.807281, 0.000000, 0.000000, -89.999981);
    CreateObject(8357, 2131.200195, 446.367249, 6.843831, 0.000000, 0.000000, -89.999981);
    CreateObject(8357, 2131.206787, 415.576599, 6.855373, 0.000000, 0.000000, -89.999981);
    CreateObject(8357, 2131.197510, 384.768738, 6.859111, 0.000000, 0.000000, -89.999981);
    CreateObject(6909, 2207.182861, 387.030273, 11.581361, 0.000000, 0.000000, 0.000000);
    CreateObject(1634, 2176.498047, 437.933685, 7.850525, 0.000000, 0.000000, -180.00002);
    CreateObject(1634, 2175.310303, 410.650391, 12.661494, 0.000000, 0.000000, -180.00002);
    CreateObject(1634, 2164.869873, 398.166687, 7.915805, 0.000000, 0.000000, -360.00004);
    CreateObject(982, 2183.479004, 403.022797, 11.861767, 0.000000, -90.240853, 0.000000);
    CreateObject(982, 2184.625488, 403.041382, 11.861801, 0.000000, -90.240853, -360.00004);
    CreateObject(982, 2185.604492, 403.030609, 11.872734, 0.000000, -90.240853, -360.00004);
    CreateObject(18367, 2168.144531, 455.992096, 6.385155, -2.57831, 0.000000, -0.859437);
    CreateObject(17565, 2140.819824, 415.022827, 8.998460, 0.000000, 0.000000, 0.000000);
    CreateObject(16303, 2205.208984, 497.991638, 3.269208, 0.000000, 0.000000, -78.750012);
    CreateObject(16084, 2156.615967, 505.153320, 4.630106, -2.57831, -18.048171, -78.750012);
    CreateObject(12956, 2085.464111, 496.493347, 10.158352, 0.000000, 0.000000, 0.000000);
    CreateObject(12914, 2120.296875, 553.649109, 8.344671, 0.000000, 0.000000, 0.000000);
    CreateObject(8375, 2129.071533, 480.493774, 8.775398, 0.000000, 0.000000, 0.000000);
    CreateObject(8302, 2095.065918, 535.768188, 8.618849, 0.000000, 0.000000, 0.000000);
    CreateObject(16401, 2104.744629, 482.987732, 6.785545, 0.000000, 0.000000, 0.000000);
    CreateObject(7979, 2197.567383, 452.393982, 9.890166, 0.000000, 0.000000, 0.000000);
    CreateObject(6052, 2178.507324, 542.426575, 9.252750, 0.000000, -0.859437, 5.15662);
    CreateObject(3364, 2118.309326, 526.004211, 6.736126, 0.000000, 0.000000, 0.000000);
    CreateObject(3363, 2115.627441, 510.550934, 6.815462, 0.000000, 0.000000, 0.000000);
    CreateObject(3270, 2054.268555, 535.926270, 5.928473, 0.000000, 0.000000, 0.000000);
    CreateObject(1697, 2126.821045, 450.155060, 8.205089, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2178.741211, 556.500488, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2188.258057, 557.472961, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2200.105225, 556.944092, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2194.516113, 557.825684, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2207.421875, 556.287170, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2214.167480, 555.498169, 6.801367, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2223.718994, 555.936157, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2219.120361, 556.630371, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2232.674072, 556.316345, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(2780, 2236.329346, 556.272156, 6.793556, 0.000000, 0.000000, 0.000000);
    CreateObject(16782, 2149.667236, 557.089539, 7.986705, 0.000000, 0.000000, 0.000000);
    CreateObject(16776, 2111.339355, 417.550873, 8.590591, 0.000000, 0.000000, -270.000001);
    CreateObject(16135, 2098.266357, 444.525543, 7.322867, 0.000000, 0.000000, 0.000000);
    CreateObject(9833, 2048.193604, 438.391632, 10.030750, 0.000000, 0.000000, 0.000000);
    CreateObject(9831, 2110.447266, 565.824219, 10.751945, 0.000000, 0.000000, 0.000000);
    CreateObject(7916, 1844.821411, 560.976379, 8.411060, 0.000000, 0.000000, -191.249989);
    CreateObject(6965, 2137.254395, 385.015472, 10.280968, 0.000000, 0.000000, 0.000000);
    CreateObject(3515, 2176.477783, 430.932251, 8.809956, 0.000000, 0.000000, 0.000000);
    CreateObject(8493, 2184.564941, 359.375122, 19.100416, 0.000000, 0.859437, -89.999981);
    CreateObject(1697, 2171.421387, 353.089966, 7.926896, 0.000000, 0.000000, 0.000000);
    CreateObject(1697, 2174.474609, 353.109985, 7.936907, 0.000000, 0.000000, 0.000000);
    CreateObject(1697, 2177.753906, 353.126343, 7.932495, 0.000000, 0.000000, 0.000000);
    CreateObject(955, 2209.741211, 425.289124, 7.250607, 0.000000, 0.000000, -180.00002);
    CreateObject(956, 2208.532959, 425.195221, 7.251572, 0.000000, 0.000000, -180.00002);
    CreateObject(1686, 2209.183594, 392.841370, 6.916397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2209.197021, 391.308044, 6.916397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2209.185303, 388.863678, 6.916397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2209.197021, 387.200897, 6.916397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2209.207764, 385.579651, 6.916397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2209.212646, 382.864349, 6.916397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2209.222412, 381.248993, 6.916397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2198.500732, 380.940430, 6.941397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2198.501709, 382.698486, 6.941397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2198.506104, 385.182709, 6.941397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2198.511719, 386.960785, 6.941397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2198.506592, 388.797516, 6.941397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2198.509521, 391.264130, 6.941397, 0.000000, 0.000000, 0.000000);
    CreateObject(1686, 2198.510010, 392.835419, 6.941397, 0.000000, 0.000000, 0.000000);
    CreateObject(11417, 2210.416016, 423.651306, 16.463020, 0.000000, 0.000000, -314.449895);
    CreateObject(11417, 2203.698975, 389.143738, 17.900520, 0.000000, 0.000000, -314.449895);
    CreateObject(11417, 2165.393799, 386.239685, 16.463020, 0.000000, 0.000000, -314.449895);
    CreateObject(11417, 2183.200684, 380.957031, 16.752083, 0.000000, 0.000000, -314.449895);
    CreateObject(3816, 2203.019043, 599.626709, 18.364010, 0.000000, 0.000000, -360.00004);

    AddStaticVehicle(451,2178.8384,621.7418,10.5487,269.5388,16,16); //
    AddStaticVehicle(451,2179.2488,614.7281,10.5490,269.8656,16,16); //
    AddStaticVehicle(451,2179.0684,607.8489,10.5490,269.7013,16,16); //
    AddStaticVehicle(451,2178.7983,603.6603,10.5515,270.1155,16,16); //
    AddStaticVehicle(451,2179.4094,598.2709,10.5474,274.0046,16,16); //
    AddStaticVehicle(451,2178.6721,594.0261,10.5486,277.8204,16,16); //
    AddStaticVehicle(451,2178.5037,591.6945,10.5500,274.4728,16,16); //
    AddStaticVehicle(451,2178.1392,588.8435,10.5516,270.0208,16,16); //
    AddStaticVehicle(451,2178.8369,585.1027,10.5473,275.9412,16,16); //
    AddStaticVehicle(451,2178.9956,582.3854,10.5477,269.5957,16,16); //
    AddStaticVehicle(451,2178.1411,579.2971,10.5524,269.0187,16,16); //
    AddStaticVehicle(451,2178.3328,573.8903,10.5504,274.7371,16,16); //
    AddStaticVehicle(522,2228.5759,573.6288,10.4198,1.4956,6,25); //
    AddStaticVehicle(522,2228.4336,579.0844,10.4056,1.4951,6,25); //
    AddStaticVehicle(522,2227.4509,587.4071,10.4166,1.1325,6,25); //
    AddStaticVehicle(522,2227.3625,591.8883,10.4112,1.1323,6,25); //
    AddStaticVehicle(522,2227.1311,595.3774,10.4100,3.3639,6,25); //
    AddStaticVehicle(522,2226.9070,599.2071,10.4089,3.3639,6,25); //
    AddStaticVehicle(522,2226.6001,604.4317,10.4069,3.3642,6,25); //
    AddStaticVehicle(522,2226.2947,609.6252,10.4124,3.3642,6,25); //
    AddStaticVehicle(522,2225.9587,615.3304,10.4063,3.3645,6,25); //
    AddStaticVehicle(522,2225.6702,620.2399,10.4091,3.3648,6,25); //
    AddStaticVehicle(522,2225.4250,624.4183,10.4112,3.3649,6,25); //
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
  SendClientMessage(playerid, 0xAA3333AA, "_____________________________________________________________________________________");
  SendClientMessage(playerid, 0xFFFFFFAA, " Юessi юjуnn notar 'D Stunt' - Eftir DJ Danni");
  SendClientMessage(playerid, 0xAA3333AA, "_____________________________________________________________________________________");
    return 1;
}

Quote:
Originally Posted by grasmanek94
hehe 10 mins ago it crashed him i had to repair the code for him :P now he asks for cars xD.. but WeeDar is right, just put them into OnFilterScriptInit
here:
http://pawn.pastebin.com/f7f069bce
or try this:
http://pawn.pastebin.com/f696f2378
or if the 2 aren't working at all this 1 must:
http://pawn.pastebin.com/f39c0a17a
fixed and teoretically working.. didn't test it :P
Nice try, but do you even know what your doing? You NEVER use OnGameModeInit in a filterscript because the game mode initializes before the filter scripts are loaded.




[Download]
AMX: http://www.mediafire.com/?jj3dzytymey

[Visual proof]
[img width=720 height=576]http://i240.photobucket.com/albums/ff233/jvance1234/ss-65.jpg?t=1237581160[/img]
[img width=720 height=576]http://i240.photobucket.com/albums/ff233/jvance1234/ss-66.jpg?t=1237581292[/img]
[img width=720 height=576]http://i240.photobucket.com/albums/ff233/jvance1234/ss-67.jpg?t=1237581570[/img]