20.04.2009, 22:32
Hey guys & gals, I'm in a bit of a rut here, I'm trying to make it so that when I drive into an icon, it teleports me to the x,y,z cords of my choice. It's like a A to B thing.
Icon1 = Teleports infront of a Mod-Garage when you drive into it
Icon2 = Teleports you back to where you started
I have it set up so that if you're not in a car - It doesn't let you teleport (By just setting your position to a few units back from where you were). Thing is, when I drive into the Icon - I don't go anywhere, nor does the car.
TOP OF MY SCRIPT
Under OnGameModeInit
When you try to walk into the icon with no car - It teleports you back like it's supposed to.
With the car, no prevail.
Can anyone help please?
PS: I just started scripting like, today. I know a bit of pawn, like, color & stuff
That's it
Icon1 = Teleports infront of a Mod-Garage when you drive into it
Icon2 = Teleports you back to where you started
I have it set up so that if you're not in a car - It doesn't let you teleport (By just setting your position to a few units back from where you were). Thing is, when I drive into the Icon - I don't go anywhere, nor does the car.
TOP OF MY SCRIPT
pawn Код:
new pickup1;
pawn Код:
pickup1 = CreatePickup(1239, 23, 1247.8792,-2037.0391,59.7714 ); // Tranfender Icon - Main Hill
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
//________________________________________ENTERS ENTERS ENTERS ENTERS______________________________________________________________
{
if (IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1943.1667,222.0864,33.7985); // In vehicle
}
else
{
SetPlayerPos(playerid, 1254.4995,-2036.9609,59.3486); // NOT in vehicle
}
}
return 1;
}
With the car, no prevail.
Can anyone help please?
PS: I just started scripting like, today. I know a bit of pawn, like, color & stuff
That's it