How to get all cars like in Single Player
#1

I wonder how to get the cars are placed in Single Player.Doing /save will take 1 year and will take alot of time.I have seen in other servers that the car is placed in same order and place can you tell me script and how to add?Have a nice day
Regards,
Mughees
Reply
#2

SA-MP's default client package have a folder 'vehicles' in scriptfiles. I think those vehicles are placed in the same manner as in singleplayer. See grandlarc mode for how to load them (check 'LoadVehicleFromFile').
Reply
#3

use the LoadVehicleFromFile for Vehicle Spawns
but the Npc Drivers lige in GTA:SA single
u need record them and script
than in server.cfg
add Maxnpc to number of npcs
---Hope i help you
Reply
#4

I am newbie can you just write the code please?
I saw vehicles script file also grandlarc but didn't understood how to add.
Can anyone can make me a small script for it please?
Reply
#5

Search grandlarency.pwn for LoadStaticVehiclesFromFile and copy all LoadStaticVehiclesFromFile to your script.
Reply
#6

Map editor maybe ?
Reply
#7

Код:
DS.pwn(79) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(79) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(80) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(80) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(83) : warning 217: loose indentation
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(83) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(83) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(84) : warning 217: loose indentation
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(84) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(84) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(85) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(85) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(88) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(88) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(89) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(89) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(90) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(90) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(93) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(93) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(94) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(94) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(95) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(95) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(96) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(96) : error 017: undefined symbol "LoadStaticVehiclesFromFile"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(99) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(99) : error 017: undefined symbol "LoadStaticVehiclesFromFile"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#8

pawn Код:
public OnGameModeInit( )
{
    // SPECIAL
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");

    // LAS VENTURAS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");

    // SAN FIERRO
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");

    // LOS SANTOS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");

    // OTHER AREAS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");

    printf( "Total vehicles from files: [ %d ]", total_vehicles_from_files );
    return (1);
}
Reply
#9

Код:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript

	AddPlayerClass(1,1684.8562,-2242.2412,13.5469,181.8800,0, 0, 0, 0, 0, 0);
	AddStaticVehicle(402,1682.6885,-2260.0315,13.5257,93.4774,0,0);
	AddStaticVehicle(402,2450.3469,-1725.7382,13.6781,266.9841,0,0);

	AddStaticVehicle(411,2379.3696,-1730.4895,14.7326,195.5444,0,0);

    // SPECIAL
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");

    // LAS VENTURAS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");

    // SAN FIERRO
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");

    // LOS SANTOS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");

    // OTHER AREAS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");

    printf( "Total vehicles from files: [ %d ]", total_vehicles_from_files );


	return 1;
}
Код:
CMDS.pwn(81) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(82) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(85) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(86) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(87) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(90) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(91) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(92) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(95) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(96) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(97) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(98) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(101) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(102) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(103) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(104) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(105) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(107) : error 017: undefined symbol "total_vehicles_from_files"
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(140) : warning 217: loose indentation
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(158) : warning 217: loose indentation
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(211) : warning 217: loose indentation
C:\Users\HP Pavilion 15\Desktop\Mughees\Freeroam\CMDS.pwn(406) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


18 Errors.
Reply
#10

https://sampforum.blast.hk/showthread.php?tid=203789

I'm not too sure if those vehicles are from singleplayer but from Slice's post, it seems so.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)