SCRIPTING REQUEST
#2

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.
Reply


Messages In This Thread
SCRIPTING REQUEST - by Salvador75 - 13.04.2019, 18:44
Re: SCRIPTING REQUEST - by TokicMajstor - 13.04.2019, 20:59

Forum Jump:


Users browsing this thread: 1 Guest(s)