SA-MP Forums Archive
SCRIPTING REQUEST - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SCRIPTING REQUEST (/showthread.php?tid=665710)



SCRIPTING REQUEST - Salvador75 - 13.04.2019

CAN ANYONE GAVE ME /saveplace and /gotoplace with saving data

Example:
After enter /saveplace
[SAVED]: You are now fully saved your set position, You can now /gotoplace

AFTER SAVEPLACE
THE DATA WILL SAVE ON
vipposition/[name.dbs]


Re: SCRIPTING REQUEST - TokicMajstor - 13.04.2019

Quote:
Originally Posted by Salvador75
View Post
CAN ANYONE GAVE ME /saveplace and /gotoplace with saving data

Example:
After enter /saveplace
[SAVED]: You are now fully saved your set position, You can now /gotoplace

AFTER SAVEPLACE
THE DATA WILL SAVE ON
vipposition/[name.dbs]
Code:
new Xx[MAX_PLAYERS], Yy[MAX_PLAYERS], Zz[MAX_PLAYERS], int[MAX_PLAYERS], vw[MAX_PLAYERS];

YCMD:saveplace(playerid, help, params[])
{
GetPlayerPos(playerid, Xx[playerid], Yy[playerid], Zz[playerid]);
int[playerid] = GetPlayerInterior(playerid);
vw[playerid] = GetPlayerVirtualWorld(playerid);
SendClientMessage(playerid, FFFFFF, "[SAVED]: Now you can use /gotoplace.");
return 1;
}
YCMD:gotoplace(playerid, help, params[])
{
SetPlayerPos(playerid, Xx[playerid], Yy[playerid], Zz[playerid]);
SetPlayerInterior(playerid, int[playerid]);
SetPlayerVirtualWorld(playerid, vw[playerid]);
SendClientMessage(playerid, FFFFFF, "You have teleported to your saved position!");
return 1;
}
This doesn't need to be saved in a file. You should have YCMD (YSI) and add checking for vip.