17.05.2011, 09:57
Greetings, everyone.
I am very new to scripting in SAMP. This is also my first thread. I have read some tutorials, I understand the basics (somewhat) and have scripted a few easy things.
But, now I want to create some Garage "system". I want two variations.
The first one
What I want: You drive in your car and pick up a pickup. Then you're able to do something like /enter. If you're not on the pick up, you're unable to enter it.
I know how to create a pickup and make it into a variable. I also got the coordinates. But, I don't know how I could script it so you have to write /enter once you picked it up.
The pickup up:
I have no clue what to do next, so a little help please?
Coordinates:
The second
What I want: You can drive to this point and use /storev(ehicle) so the car despawn and you can spawn it back later.
There should be a pickup here as well and I want these commands available:
/checkv - Shows which vehicles are in the garage.
/storev - Explained above, this should store your car in the garage (despawn).
/getv - Spawns the vehicle again
If it's possible, could there be a limit of 3 vehicles in the garage?
The coordinate of this garage is:
Thanks a lot!
I am very new to scripting in SAMP. This is also my first thread. I have read some tutorials, I understand the basics (somewhat) and have scripted a few easy things.
But, now I want to create some Garage "system". I want two variations.
The first one
What I want: You drive in your car and pick up a pickup. Then you're able to do something like /enter. If you're not on the pick up, you're unable to enter it.
I know how to create a pickup and make it into a variable. I also got the coordinates. But, I don't know how I could script it so you have to write /enter once you picked it up.
The pickup up:
pawn Code:
new GaragePickup;
public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1877.9052734375,-1737.6791992188,13.355146,180, 0, 0, 0, 0, 0, 0);
AddStaticVehicle(587, -1745.3572998047, 982.47320556641, 17.678091049194, 270, 38, 1);
AddStaticVehicle(587, 1886.4532470703, -1746.6672363281, 13.356875419617, 90, 38, 1);
GaragePickup = CreatePickup(3096,2,1866.1990966797,-1760.0908203125,13.546875,-1);
return 1;
}
Coordinates:
Code:
Playerspawn: 1877.9052734375,-1737.6791992188,13.355146,180 Where the player starts Garage1: 1884.8843994141,-1760.4916992188,13.546875 Where the pickup is and the entrace of the garage. InGarage: -1747.0718994141,987.37799072266,18.087209701538 Where you should be teleported to when you enter it. (Also you should be able to do /exit here as well.
What I want: You can drive to this point and use /storev(ehicle) so the car despawn and you can spawn it back later.
There should be a pickup here as well and I want these commands available:
/checkv - Shows which vehicles are in the garage.
/storev - Explained above, this should store your car in the garage (despawn).
/getv - Spawns the vehicle again
If it's possible, could there be a limit of 3 vehicles in the garage?
The coordinate of this garage is:
Code:
Garage2: 1866.1990966797,-1760.0908203125,13.546875