04.04.2013, 05:15
This is a basic Pickup Teleport Tutorial for begginers
If we want to make a teleport with pickup,first time we must create a pickup
We can create a pickup with
CreatePickup - Create the pickup
model - pickup model
type - pickup type
Float:X - The X coordinate of the pickup
Float:Y - The Y coordinate of the pickup
Float:Z - The Z coordinate of the pickup
virtualworld - In what virtualworld the pickup will appear(0 for standard world)
First time,we'll create a new variable,i will call it tele(from teleport),you can call this variable how you like
Now,let's go at OnGameModeInit to create the pickup(tele will "mark" the pickup)
Now the pickup it's created.
Go at OnPlayerPickUpPickup,
We'll use pickupid (a parameter from OnPlayerPickUpPickup) to create the action of pickup
SetPlayerPos(playerid,Float:X , Float:Y , Float:Z);
playerid - The player who we will set the new position
Float:X - The X coordinate of new position
Float:Y - The Y coordinate of new position
Float:Z - The Z coordinate of new position
That's all,i hope i helped you guys
If we want to make a teleport with pickup,first time we must create a pickup
We can create a pickup with
- CreatePickup
CreatePickup - Create the pickup
model - pickup model
type - pickup type
Float:X - The X coordinate of the pickup
Float:Y - The Y coordinate of the pickup
Float:Z - The Z coordinate of the pickup
virtualworld - In what virtualworld the pickup will appear(0 for standard world)
First time,we'll create a new variable,i will call it tele(from teleport),you can call this variable how you like
Код:
new tele;
Код:
tele = CreatePickup(model , type , Float:X , Float:Y , Float:Z , virtualworld = 0);
Go at OnPlayerPickUpPickup,
We'll use pickupid (a parameter from OnPlayerPickUpPickup) to create the action of pickup
Код:
if(pickupid == tele) { SetPlayerPos(playerid,Float:x,Float:y,Float:z); }
playerid - The player who we will set the new position
Float:X - The X coordinate of new position
Float:Y - The Y coordinate of new position
Float:Z - The Z coordinate of new position
That's all,i hope i helped you guys