OnPlayerPickupPickup
#1

Hi!


I'm trying to do a teleport..


With a pickup but I can't rember how I did last year... I've lookt on Wiki but not same thing I need..
And I have the other code (Alredy fixed).

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == prisonInt)
    SetPlayerPos(playerid,-5158.9482,2868.0576,32.1957);
    return 1;
}

pawn Код:
prisonInt = CreatePickup(1318,-2625.0925,1411.6375,7.0938);

And what it complains about :/... :

Код:
C:\Users\Davve\Desktop\Fire n flames RPG TDM\Server\Fire.pwn(817) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
LOL had 5 errors but now 1...
I'm a little beginner still ^^...
Reply
#2

X Y Z Are 3 arrays, you've added 4 arrays.
Reply
#3

Quote:
Originally Posted by WackoX
Посмотреть сообщение
X Y Z Are 3 arrays, you've added 4 arrays.
Oh okay mistake ^^... Thanks for ur reply ...


Edit: The rest fixed (Warnings etc)..


Edit: 2 Now all fixed!!..
Reply
#4

Page edited with other erros but now just 1 error left.
pawn Код:
C:\Users\Davve\Desktop\Fire n flames RPG TDM\Server\Fire.pwn(817) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

And aslo if I add pick up id I will get a error :S... Code:

pawn Код:
prisonInt = CreatePickup(1318,-2625.0925,1411.6375,7.0938);
Reply
#5

https://sampwiki.blast.hk/wiki/CreatePickup

lrn2wiki
Reply
#6

Quote:
Originally Posted by davve95
Посмотреть сообщение
Page edited with other erros but now just 1 error left.
pawn Код:
C:\Users\Davve\Desktop\Fire n flames RPG TDM\Server\Fire.pwn(817) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

And aslo if I add pick up id I will get a error :S... Code:

pawn Код:
prisonInt = CreatePickup(1318,-2625.0925,1411.6375,7.0938);
You need to create the pickup like so.
pawn Код:
CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
//so i assume like
prisionInt = CreatePickup(1318,choose your type,-2625.0925,1411.6375,7.0938,0);
EDIT: the link MP2 gave you pretty much explains it
Reply
#7

Quote:
Originally Posted by nickdodd25
Посмотреть сообщение
You need to create the pickup like so.
pawn Код:
CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
//so i assume like
prisionInt = CreatePickup(1318,choose your type,-2625.0925,1411.6375,7.0938,0);
EDIT: the link MP2 gave you pretty much explains it
Thanks alot! I will give rep.. MP2 I lookt in Wiki but I didn't find exactily this... (With pickup and teleport)..


Got more errors :S... Still a little bit beginner ^^ ...

Codes & errors: http://pastebin.com/N7FwE9Ne


MP2 - Oh ok,thanks..
Reply
#8

That's irrelevant, all you needed was the correct syntax for CreatePickup.

Quick tip: typing Function( in to pawno pops up the parameters, so type 'CreatePickup(' in pawno then wait a second, and it will tell you what params it's expecting.
Reply
#9

Quote:
Originally Posted by MP2
Посмотреть сообщение
That's irrelevant, all you needed was the correct syntax for CreatePickup.

Quick tip: typing Function( in to pawno pops up the parameters, so type 'CreatePickup(' in pawno then wait a second, and it will tell you what params it's expecting.
Okay thanks like said! .. But I didn't mean like that, I just ment that Wiki haden't tell just
how to do Pick up teleport... I think.

Anyway I still got problem: http://pastebin.com/N7FwE9Ne

Error codes etc in the link.

I can pretty much Pawno but still beginner xD.
Reply
#10

Try looking at the page I linked you to.

https://sampwiki.blast.hk/wiki/CreatePickup

READ it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)