[Tutorial] Pickup Teleport
#1

PICKUP TELEPORT TUTORIAL
Introduction:
You : Omg, I don't know how to make a pickup teleport i tried 100 way but didn't worked
Me : Oh Today you will know how to , don't worry, im here for helping people and for i get helped from others



Let's begin
First thing we will do is DEFINE the pickup as the name you choose
STEP1
script:
Code:
new pickup1;
Good we have define it now let's create the pickup
STEP2
script:
Code:
pickup1 = CreatePickup(1239, 19, 2343.802734375 ,547.4677734375 ,6029.7553710938);
Code:
                   //CreatePickup(model, type of spawn, Float:X, Float:Y, Float:Z,virtualworld = 0);
Good job now let's move to the next Step

STEP3:
On this step we will make the pickup teleport the player that pick up it!!
Good
Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
   if(pickupid == pickup1)//Here is our pickup the pickup1
    {
 SetPlayerPos(playerid, x, y, z); //Here is the functions we will use!! 
 SendClientMessage(playerid, 0xFFFF00FF, "You have been teleported to X");
     return 1;
    }
return 0;
}// Good we are done now
Done made by [WTF]Godfather Please feel free to post if there's a problem or error so we can fix it
And if you got any other idea or another pickup script type please post it and feel free as i said
Thanks you viewing my Tutorial i hope you like it
Reply
#2

Very ease and useful for others . Thanks .
Reply
#3

No problem my friend yes it's usefull and easiest way for new scripters (Newbies)
Reply
#4

Good tutorial
Reply
#5

Thanks
Reply
#6

Awesome and helpful.
Reply
#7

For tutorials you should use 0xFFFF00FF instead of COLOR_RED, otherwise newbies will have errors while compiling, if they do not know how to define such. But for the rest its a nice tutorial
Reply
#8

Quote:
Originally Posted by alpha500delta
View Post
For tutorials you should use 0xFFFF00FF instead of COLOR_RED, otherwise newbies will have errors while compiling, if they do not know how to define such. But for the rest its a nice tutorial
Fixed thanks you
Reply
#9

Good tutorial my friend
Reply
#10

Next time use [pawn] [/pawn ] (Without that space)
Reply
#11

When I enter the Pickup, and get back, pickup disappears and I can't enter anymore, also doesn't work with cars.
Reply
#12

Quote:
Originally Posted by MrND
View Post
When I enter the Pickup, and get back, pickup disappears and I can't enter anymore, also doesn't work with cars.
That's true, he used pickupid 19 in the code wich is pickupable. I would recommend using pickpid 1 as it exists all the time. For a complete list, look here
Reply
#13

Quote:
Originally Posted by alpha500delta
View Post
That's true, he used pickupid 19 in the code wich is pickupable. I would recommend using pickpid 1 as it exists all the time. For a complete list, look here
Thanks, It helped me a lot.
Reply
#14

h i want to make the pickup just for team cops for exemple , so other teams can not enter the pickup help me please
Reply
#15

Maybe a little bit more explanation, but else awesome tutorial!
Reply
#16

Quote:

pickup1 = CreatePickup(1239, 19, 2343.802734375 ,547.4677734375 ,6029.7553710938 );

to be added here;

pawn Code:
public OnGameModeInit()
{

pickup1 = CreatePickup(1239, 19, 2343.802734375 ,547.4677734375 ,6029.7553710938);

return 1;
}
Reply
#17

great one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)