Posts: 62
Threads: 13
Joined: Mar 2011
Reputation:
0
Or is there something like that you go in checkpoint and it will automatically teleport you there?
Posts: 3,004
Threads: 12
Joined: May 2011
Quote:
Originally Posted by pliptm
Is there possible to teleport with one command two or more players?
I want do some kinda police system. When officer want put player to prison, he needs to teleport. I want to do similar to next command or something like that(/teleportjail [officer id] [criminal id] ) and both persons will be teleported to cords.
Sry for super massive bad english, just quick theard.
|
lol try this :
pawn Код:
#include <a_samp>
#include <zcmd>
CMD:teleportjail(playerid, params[])
{
new
officer,
criminal;
if(!sscanf(params,"rr", officer, criminal)) {
if(!IsPlayerConnected(officer)) {
SendClientMessage(playerid, COLOR_LIGHTRED,"This officer is not connected!");
}
else {
if(!IsPlayerConnected(criminal)) {
SendClientMessage(playerid, COLOR_LIGHTRED,"This officer is not connected!");
}
else {
SetPlayerPos(criminal, X, Y, Z); // change the X,Y,Z to the pos you want the criminal to be teleported
SetPlayerPos(officer, X, Y, Z); // change the X,Y,Z to the pos you want the officer to be teleported
}
}
return 1;
}
Posts: 3,004
Threads: 12
Joined: May 2011
Quote:
Originally Posted by pliptm
I actually want like i insert id's like /teleportjail 1 2 ( "1" is my id and "2" is criminal/other person id) because server dosen't recognize somehow criminal and officer
|
ok:
pawn Код:
CMD:teleportjail(playerid, params[])
{
new
criminal;
if(!sscanf(params,"r", criminal)) {
if(!IsPlayerConnected(criminal)) { SendClientMessage(playerid, COLOR_LIGHTRED,"This officer is not connected!"); }else{
SetPlayerPos(criminal, X, Y, Z); // change the X,Y,Z to the pos you want the criminal to be teleported
}
}else{
SendClientMessage(playerid, COLOR_LIGHTRED,"USAGE: /teleprotjail [criminalid]
return 1;
}
Posts: 62
Threads: 13
Joined: Mar 2011
Reputation:
0
Asking help again. Is there script or that this work only for cops?
Posts: 1,988
Threads: 17
Joined: Apr 2011
Reputation:
0
What's your faction variable?