12.04.2012, 07:32
Hello!
I have a big problem with the command /get ingame. Let me explain:
If i am going to /get, and the player is in a vehicle, the command totally fails. Instead of "getting" the person to your location, it teleports the player to a farm, under the ground, and the player is falling in the void.
I have checked my script, and i havent touched it:
And i am wondering, can i fix it?
I dont want the player to go out of vehicle each time i am going to /get them, so.... Thanks!!
I have a big problem with the command /get ingame. Let me explain:
If i am going to /get, and the player is in a vehicle, the command totally fails. Instead of "getting" the person to your location, it teleports the player to a farm, under the ground, and the player is falling in the void.
I have checked my script, and i havent touched it:
Код:
CMD:get(PARAMS)
{
LoginCheck(playerid);
LevelCheck(playerid, 3);
new Player;
if(sscanf(params, "u", Player)) return SendUsage(playerid, "/get "GREY"<id>", "Will teleport the specified player to your position");
else
{
if(Player == (0xFFFF)) return SendError(playerid, "Player not connected!");
if(Player == playerid ) return SendError(playerid, "Player entered is you!");
CheckImune(playerid, Player);{}
new Float: Pos[4];
if(IsPlayerInAnyVehicle(Player))
{
LinkVehicleToInterior(GetPlayerVehicleID(Player), GetPlayerInterior(playerid));
SetVehicleVirtualWorld(GetPlayerVehicleID(Player), GetPlayerVirtualWorld(playerid));
SetVehiclePos(GetPlayerVehicleID(Player), Pos[0] + 2, Pos[1] + 2, Pos[2] + 2);
SetVehicleZAngle(GetPlayerVehicleID(Player), Pos[3]);
}
else
{
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(playerid, Pos[3]);
SetPlayerPos(Player, Pos[0], Pos[1] + 2, Pos[2] + 1);
SetPlayerFacingAngle(Player, Pos[3]);
}
SetPlayerVirtualWorld(Player, GetPlayerVirtualWorld(playerid));
SetPlayerInterior(Player, GetPlayerInterior(playerid));
SendAdminCMD(playerid, "Admin "ORAN"%s[%i]"GREY" teleported "ORAN"%s[%i]"GREY" to his location!", Name(playerid), playerid, Name(Player), Player);
FormatMSG(playerid, Color:GREY, "You teleported to "ORAN"%s[%i]"GREY" to your location!", Name(Player), Player);
}
return 1;
}
I dont want the player to go out of vehicle each time i am going to /get them, so.... Thanks!!



