02.03.2014, 16:36
So, i am editing my goto command, right now admins who is in a vehicle can't use it, but i'll make it so they can,
but first, i want to check if the player they want go to is in a interior, if they are, they will get a message there it says "this player is in a interior, you cannot go to him"
but first, i want to check if the player they want go to is in a interior, if they are, they will get a message there it says "this player is in a interior, you cannot go to him"
pawn Код:
new Float:x, Float:y, Float:z;
if(IsPlayerInAnyVehicle(playerid)) {
GetPlayerPos(pID, x, y, z);
SetPlayerInterior(playerid, GetPlayerInterior(pID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
SetVehiclePos(GetPlayerVehicleID(playerid), x+2, y+2, z);
}
else
{
GetPlayerPos(pID, x, y, z);
SetPlayerInterior(playerid, GetPlayerInterior(pID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
SetPlayerPos(playerid, x+2, y+2, z);
}