14.08.2009, 11:59
I am trying to make a pickup that teleports me somewhere.
I want it to be the pickup id 1273 that takes me there.
at the top of my gamemode i have
new Home;
next to my staticpickups( weapons) i have
Home = CreatePickup(1273, 2, 1300.7528,-795.9010,1084.007
;
at the bottom of my gamemode i have
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == Home)
{
SetPlayerPos(playerid,1299.7760,-791.3349,1084.007
;
}
return 1;
}
It compiles, however when i stand over the pickup it has no effect and just dissappears.
Any help would be appreciated.
I want it to be the pickup id 1273 that takes me there.
at the top of my gamemode i have
new Home;
next to my staticpickups( weapons) i have
Home = CreatePickup(1273, 2, 1300.7528,-795.9010,1084.007
![Cool](images/smilies/cool.gif)
at the bottom of my gamemode i have
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == Home)
{
SetPlayerPos(playerid,1299.7760,-791.3349,1084.007
![Cool](images/smilies/cool.gif)
}
return 1;
}
It compiles, however when i stand over the pickup it has no effect and just dissappears.
Any help would be appreciated.