Problem Found
#6

EDIT USE THIS:

ON TOP OF THE SCRIPT UNDER INCLUDES:
pawn Код:
enum SavePosENUM { Float:sX, Float:sY, Float:sZ, Float:sA, SavedPos };
new SavePos[MAX_PLAYERS][SavePosENUM];
OnPlayerCommandText:
pawn Код:
if(!strcmp(cmdtext, "/lp",true) || !strcmp(cmdtext,"/lpos",true))
        {
    if (SavePos[playerid][SavedPos] == 0) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: Use /spos to save a position first!");
    if (IsPlayerInAnyVehicle(playerid))
        {
    SetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
    SetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
        } else {
    SetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
    SetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
        }
    return SendClientMessage(playerid, COLOR_WHITE, "You have teleported to the last position you have saved.");
        }
pawn Код:
if(!strcmp(cmdtext, "/spos",true) || !strcmp(cmdtext,"/sp",true)){ if (IsPlayerInAnyVehicle(playerid))
        {
    GetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
    GetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
        }else {
    GetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
    GetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
        }SavePos[playerid][SavedPos] = 1;
    return SendClientMessage(playerid, COLOR_WHITE, "Position saved.Use /lpos to go to the saved pos");
        }
Reply


Messages In This Thread
Problem Found - by Xpack - 22.01.2010, 15:52
Re: Problem Found - by (Jeff) - 22.01.2010, 15:53
Re: Problem Found - by Xpack - 22.01.2010, 15:54
Re: Problem Found - by KnooL - 22.01.2010, 16:06
Re: Problem Found - by Xpack - 22.01.2010, 16:11
Re: Problem Found - by KnooL - 22.01.2010, 16:19
Re: Problem Found - by Xpack - 22.01.2010, 16:25
Re: Problem Found - by KnooL - 22.01.2010, 16:36
Re: Problem Found - by Xpack - 22.01.2010, 16:40
Re: Problem Found - by KnooL - 22.01.2010, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)