Very big problem please help me -
Euan Hughes - 06.07.2012
Ok so i am going to try and explain this aswell as i can
At the top of my script i have this
So i have a truck that i that is made in "InGameModeInInt" like this "truck = AddStaticVehicle(.....)
Well i try to get in the vehicle and it just wont let me i assume as soon as it spawns it sets the vehicle to CarGroup 0 and i have this in "OnPlayerEnterVehicle"
pawn Код:
if(Vehicles[vehicleid][CarGroup] != 0 && Vehicles[vehicleid][CarGroup] != Player[playerid][Group])
{
if(ispassenger == 0)
{
ClearAnimations(playerid);
}
}
That bit of code there makes it so if your not in a faction you cant get in a faction vehicle
It wont let me get into the truck atall even though its a static vehicle i have tried adding
pawn Код:
Vehicles[truck][CarGroup] = 0;
In "OnGameModeInIt" but it still did not work
If you need any more code just ask
Please help
Thanks
What im asking is how can i make it so i can enter the vehicle...
Re: Very big problem please help me -
Steven82 - 06.07.2012
Stop making new topics!
Re: Very big problem please help me -
Euan Hughes - 06.07.2012
Quote:
Originally Posted by Steven82
Stop making new topics!
|
Why wont no one help me
Thanks
Re: Very big problem please help me -
iGetty - 06.07.2012
Try using: if(GetPlayerVehicleID(playerid) == truck)
Then work off that?
Re: Very big problem please help me -
Euan Hughes - 06.07.2012
Quote:
Originally Posted by iGetty
Try using: if(GetPlayerVehicleID(playerid) == truck)
Then work off that?
|
Would something like this work
pawn Код:
if(GetPlayerVehicleID(playerid) == truck)
{
continue;
}
Would that make it carry on attempting to get in the truck
Thanks
Re: Very big problem please help me -
Euan Hughes - 06.07.2012
Please help
Thanks
Re: Very big problem please help me -
CmZxC - 06.07.2012
I think continue; is used for loops ... to carry on entering the truck you should simply use return 1;
Re: Very big problem please help me -
coole210 - 06.07.2012
If it's in OnPlayerEnterVehicle It would simply be:
pawn Код:
if(vehicleid == truck && !ispassenger)//Entering truck, and not entering as a passenger.
{
//Code
}