Posts: 87
Threads: 34
Joined: Sep 2013
Reputation:
0
So I'm trying to load a crate into a boxville, but I'm not quite sure what function to use. I thought of using IsPlayerInRangeOfPoint, but I realized that I didn't know whether that function could replace the coordinates with a variable or not.
Three boxville's were created and given the ID:
new boxvilleID1,
boxvilleID2,
boxvilleID3;
I even created a variable for crate.
The question is, how am I supposed to load a crate to a boxville?
Posts: 851
Threads: 33
Joined: Jul 2016
Reputation:
0
You can make enums for vehicle for example that if that boxville got the enum [vCrate] = 1 then it has a crate inside, if 0 then it doesn't have, this is a simple way of making it..
Posts: 1,506
Threads: 13
Joined: Jun 2015
Quote:
Originally Posted by Mo123
But how will I make the command itself? How will I tell the script to load the actual crate into one of these boxvilles when I'm close enough?
This is what I've got so far:
CMD:loadcrateboxville(playerid, params)
{
if(PlayerInfo[playerid][pCrate] = 1) &&
{
}
}
|
This isn't a request forum for script and codes - You'll have to do that yourself, we only provide support for code you're having trouble with.
Assuming from the little knowledge I've about what exactly you want to do, you'll need an array with size-of MAX_VEHICLES with an enumerator, and then you may give player some animation, some attached object, and use some function to detect whether they are going are behind the vehicle or not, if they are then you just remove the attached object, the animation, and assign some value to the specified array.