/noclip or /fly
#1

I've seen it on some servers you can /fly or /noclip and fly around the city like spiderman, anyone know?
I've already searched and couldn't find anything.
Reply
#2

Like spiderman? I saw a grappling-hook plug-in once, it uses MapAndreas. Otherwise, I don't know what exactly you are looking for.
Reply
#3

Some people use /fly
Reply
#4

Try this
pawn Код:
CMD:fly(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 2) {
        new Float:px, Float:py, Float:pz, Float:pa;
        GetPlayerFacingAngle(playerid,pa);
        if(pa >= 0.0 && pa <= 22.5) {             //n1
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px, py+30, pz+5);
        }
        if(pa >= 332.5 && pa < 0.0) {             //n2
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px, py+30, pz+5);
        }
        if(pa >= 22.5 && pa <= 67.5) {            //nw
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px-15, py+15, pz+5);
        }
        if(pa >= 67.5 && pa <= 112.5) {           //w
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px-30, py, pz+5);
        }
        if(pa >= 112.5 && pa <= 157.5) {          //sw
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px-15, py-15, pz+5);
        }
        if(pa >= 157.5 && pa <= 202.5) {          //s
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px, py-30, pz+5);
        }
        if(pa >= 202.5 && pa <= 247.5) {          //se
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px+15, py-15, pz+5);
        }
        if(pa >= 247.5 && pa <= 292.5) {          //e
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px+30, py, pz+5);
        }
        if(pa >= 292.5 && pa <= 332.5) {          //e
            GetPlayerPos(playerid, px, py, pz);
            SetPlayerPos(playerid, px+15, py+15, pz+5);
        }
    }
    else {
        SendClientMessageEx(playerid, COLOR_GRAD1, "   You are not an Admin!");
    }
    return 1;
}
Reply
#5

I have a simpler solution. You can yourself lucky because I already scripted this function.

Код:
stock SetPlayerForwardVelocity(playerid,Float:Velocity, Float:Z1)
{
new Float:Getx1, Float:Gety1, Float:Getz1;
new Float:AngleZ1;
new Float:SpeedX1, Float:SpeedY1;
new Float:Mulx1, Float:Muly1;
GetPlayerVelocity(playerid, Getx1 ,Gety1 ,Getz1);
GetPlayerFacingAngle(playerid,AngleZ1);
SpeedX1 = floatsin(-AngleZ1, degrees);
SpeedY1 = floatcos(-AngleZ1, degrees);
Mulx1 = floatmul(Velocity, SpeedX1);
Muly1 = floatmul(Velocity, SpeedY1);
SetPlayerVelocity(playerid, floatadd(Mulx1,Getx1), floatadd(Muly1, Gety1), floatadd(Getz1, Z1));
return 1;
}
And for /fly:

Код:
return SetPlayerForwardVelocity(playerid,0.6, 0.4);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)