SetPlayerPos, i need a basic script.
#1

Well... i need a basic way to make it so that it GetPlayerPos's my position, then sets the giveplayerid's position slightly a little behind my character. Can someone show me a simple example? Thats all im asking, since i'm a Basic Scripter.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=280379
Why did you create double thread?
Reply
#3

pawn Код:
dcmd_gethere(playerid, params[]) //level 2
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "You're not an admin!");
new player;
if(sscanf(params, "u", player)) return SendClientMessage(playerid, -1, "USUAGE: /gethere [playerid]");
if(!IsPlayerConnected(player)) return SendClientMessage(playerid, -1, "Invalid player id!");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(player, x+2, y+2, z);
SendClientMessage(player, COLOR_LIGHTRED, "You've been teleported!");
return 1;
}
Reply
#4

pawn Код:
new Float:X,Float:Y,Float:Z;

GetPlayerPos(playerid, X,Y,Z);
SetPlayerPos(playerid, X,Y,Z +10);
This get player's position and drop him from 10 meters, If you simply use SetPlayerPos(playerid, X,Y,Z +10);
You will be droped but you will be teleported somewhere too, First you need to get Player's Position.

Thanks.
Reply
#5

Need INC:
ZCMD
SSCANF


pawn Код:
CMD:(playerid, params[])
{
new Float:X,Float:Y,Float:Z;
new target;
if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "USUAGE: /get [playerid]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "Invalid player id!");
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(target, x+2, y+2, z);
SendClientMessage(target, 0x81CFAB00, "Someone Is teloprted you!");
return 1;
}
Reply
#6

Is it possible for u to make a timer with it too, so that when i type a command it will teleport the ID of the person i type in behind me a few meters, and each 1 second it continually teleports again and again until i type another command, it it would stop teleporting.
Reply
#7

Can I ask why you would want something like that? It'd annoy the shit out of me.
Reply
#8

Quote:
Originally Posted by -Luis
Посмотреть сообщение
Can I ask why you would want something like that? It'd annoy the shit out of me.
Quote:
Originally Posted by varthshenon
Посмотреть сообщение
There....
Reply
#9

I actually meant this.

Quote:
Originally Posted by KurtBag
Посмотреть сообщение
Is it possible for u to make a timer with it too, so that when i type a command it will teleport the ID of the person i type in behind me a few meters, and each 1 second it continually teleports again and again until i type another command, it it would stop teleporting.
Reply
#10

Quote:
Originally Posted by -Luis
Посмотреть сообщение
I actually meant this.
Did you even click on the link I gave to you?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)