Help with this command [+1 rep]
#9

I re-made the whole script ( Including command /savep ).

Try this -
pawn Код:
new Float: x , Float: y , Float: z , Float: Angle;

CMD:savep( playerid , params [] )
{
    GetPlayerPos ( playerid , x , y , z ) ;
    GetPlayerFacingAngle ( playerid , Angle ) ;
    return 1;
}


CMD:loadp( playerid , params [] )
{
    if(x == 0.0 && y == 0.0 && z == 0.0)
        {
            SendClientMessage(playerid, -1, "* Write /savep before teleporting.");
        }
        else
        {
                if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                    {
                        new VehicleID;
                        VehicleID = GetPlayerVehicleID(playerid);
                        SetVehiclePos(VehicleID, x , y , z);
                        SetPlayerFacingAngle(playerid,Angle);
                        SetCameraBehindPlayer(playerid);
                        LinkVehicleToInterior(GetPlayerVehicleID(playerid),PosI[playerid]);
                    }
                    else
                    {
                        SetPlayerPos(playerid,x, ,y , z);
                        SetPlayerFacingAngle(playerid,Angle);
                        SetCameraBehindPlayer(playerid);
                    }
                        PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
                        SetPlayerInterior(playerid, PosI[playerid]);
                        SendClientMessage(playerid, -1, "* You has been teleporting to saved position.");
   
        }
    return 1;
}
Reply


Messages In This Thread
Help with this command [+1 rep] - by sniperwars - 15.03.2012, 07:28
Re: Help with this command [+1 rep] - by HighPitchedVoice - 15.03.2012, 07:31
Re: Help with this command [+1 rep] - by nmader - 15.03.2012, 07:42
Re: Help with this command [+1 rep] - by sniperwars - 15.03.2012, 07:43
Re: Help with this command [+1 rep] - by eesh - 15.03.2012, 07:51
Re: Help with this command [+1 rep] - by nmader - 15.03.2012, 08:03
Re: Help with this command [+1 rep] - by ReneG - 15.03.2012, 08:24
Re: Help with this command [+1 rep] - by sniperwars - 15.03.2012, 16:53
Re: Help with this command [+1 rep] - by Ronaldo_raul™ - 15.03.2012, 17:28
Re: Help with this command [+1 rep] - by sniperwars - 15.03.2012, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)