How would I make a command to teleport them forward, left, right, or back?
#3

https://sampforum.blast.hk/showthread.php?tid=325872

Now you would need to modify that slightly to do what you want example.

pawn Код:
stock Float:GetPosInFrontOfPlayer(playerid, Float:distance, Float:aoffset, &Float:x, &Float:y)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    a += aoffset;
    switch(IsPlayerInAnyVehicle(playerid))
    {
        case 0: GetPlayerFacingAngle(playerid, a);
        case 1: GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)