[UNSOLVED] Onplayerpickuppickup -
cozza123456 - 14.08.2009
I am trying to make it so that when a player walks on the pickup, it will teleport them to the inside of a building.
Heres What i am doing.
new Home;
public OnPlayerPickUpPickup(playerid,pickupid)
{
if (pickupid == Home)
{
SetPlayerPos(playerid,1299.7760,-791.3349,1084.007

;
}
}
It compiles but when i test it, it doesn't teleport me anywhere. What have i done wrong that has made it so when you stand on it it just disappears.
Any help is appreciated.
Re: [Help] Onplayerpickuppickup -
Correlli - 14.08.2009
You need to do it like:
pawn Код:
new Home = CreatePickup(..
https://sampwiki.blast.hk/wiki/CreatePickup
Re: [Help] Onplayerpickuppickup -
cozza123456 - 14.08.2009
ok so i done that but what do i put the in the brackets, new Home = CreatePickup(..
Re: [Help] Onplayerpickuppickup -
cozza123456 - 14.08.2009
ooh i see that website tells me ok thanks so much
Re: [Help] Onplayerpickuppickup -
cozza123456 - 14.08.2009
ok, so i still have problems, my compiler keeps not responding when i compile?!
"Pawn Compiler Library has stopped working."
Re: [Help] Onplayerpickuppickup -
cozza123456 - 14.08.2009
sorry for multiple posts,
now i get this error.
(6521) : error 010: invalid function or declaration
Heres line 6521,
pickup = CreatePickup( 1300.7528,-795.9010,1084.007

;
Re: [Help] Onplayerpickuppickup -
Correlli - 14.08.2009
You're not using it correctly. Read this:
Quote:
CreatePickup(model, type, Float:X, Float:Y, Float:Z)
model The model ID you'd like for the pickup.
type The pickup spawn type, see further down this page.
Float:X The X-coordinate for the pickup to show.
Float:Y The Y-coordinate for the pickup to show.
Float:Z The Z-coordinate for the pickup to show.
Returns The PickupID.
|
Re: [Help] Onplayerpickuppickup -
cozza123456 - 14.08.2009
oh yes silly me, thanks
Re: [Help] Onplayerpickuppickup -
cozza123456 - 14.08.2009
wow errors are so annoying, i still get that error even after changing it?
(6521) : error 010: invalid function or declaration
lines,
new Home;
home = CreatePickup(1273, 2, 1300.7528,-795.9010,1084.007

; (this ones line 6521)
public OnPlayerPickUpPickup(playerid,pickupid)
{
if (pickupid == Home)
{
SetPlayerPos(playerid,1299.7760,-791.3349,1084.007

;
}
}
Re: [Help] Onplayerpickuppickup -
Correlli - 14.08.2009
All pickups should be at OnGameModeInit callback.
And here is another mistake:
Quote:
new Home;
home = CreatePickup(1273, 2, 1300.7528,-795.9010,1084.007 ;
|