25.03.2012, 17:38
(
Last edited by kelvin22; 25/03/2013 at 01:31 PM.
)
OnPlayerClickPlayer Teleport
Functions we're going to use:
OnPlayerClickPlayer
GetPlayerPos
SetPlayerPos
Lets start:
pawn Code:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
// Declare 3 float variables to store the X, Y and Z coordinates in
new Float:x, Float:y, Float:z;
// Use GetPlayerPos, passing the 3 float variables we just created
GetPlayerPos(clickedplayerid, x, y, z);
// SetPlayerPos from: 3 float variables wich we saved
SetPlayerPos(playerid, x,y,z);
return 1;
}