27.04.2013, 17:28
I have these two commands and it has been very useful for the development for our server:
and
I want them to both still do the same function, but to take your vehicle. And if it takes your vehicle, it should teleport you about 5 inches away. Is this possible?
Код:
CMD:tp(playerid, params[])
{
new targetid;
new target[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Usage: /tp [id]");
GetPlayerName(targetid, target, sizeof(target));
GetPlayerPos(targetid, x, y, z);
SetPlayerPos(playerid, x, y, z);
SendClientMessage(targetid, COLOR_WHITE, "An admin has teleported to you.");
return 1;
}
Код:
CMD:bring(playerid, params[])
{
new targetid;
new target[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Usage: /bring [id]");
GetPlayerName(targetid, target, sizeof(target));
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(targetid, x, y, z);
SendClientMessage(targetid, COLOR_WHITE, "You have been teleported to an admin by an admin.");
return 1;
}

