23.05.2014, 14:21
Hello Guys,I Am Having A Problem,When I Save The Position And When I Rejoin To My Server When I Do /gotoplace1 It Teleports Me To The Saved Position,But When Restarting The Server,It Teleports Me To The Default Position (Blueberry):
Codes Of The Command /gotoplace1:
Codes Of The Command /gotoplace1:
pawn Код:
COMMAND:gotoplace1(playerid, params[])
{
if(!fexist(user_ini_file(playerid)))
{
SendClientMessage(playerid, COLOR_RED, "You Have Not Saved Your Place Number 1, Yet! Use /saveplace1 To Save Your Current Place To Number 1");
}
else if(fexist(user_ini_file(playerid)))
{
INI_ParseFile(user_ini_file(playerid), "load_user_%s", .bExtra = true, .extra = playerid);
SetPlayerPos(playerid, YPosInfo[playerid][PosX], YPosInfo[playerid][PosY], YPosInfo[playerid][PosZ]);
SetPlayerFacingAngle(playerid, YPosInfo[playerid][Angle]);
SetPlayerInterior(playerid, YPosInfo[playerid][Interior]);
SetPlayerVirtualWorld(playerid, YPosInfo[playerid][VirtualWorld]);
SendClientMessage(playerid, COLOR_ORANGE, "Successfully Teleported To Your Place Number 1.");
}
return 1;
}