save and loadpos
#4

Heres a copy and paste out of my command:
Код:
	if (strcmp("/gotopos", cmdtext, true, 10) == 0)
	{
	if(!stored[playerid]) return SendClientMessage(playerid,YELLOW,"[ERROR]Please /savepos first then /gotopos");
	{
	SendClientMessage(playerid,YELLOW,"You have teleported to your last saved position.");
	if(IsPlayerInAnyVehicle(playerid))
	{
	new vehid = GetPlayerVehicleID(playerid);
	SetVehiclePos(vehid,Xpos[playerid],Ypos[playerid],Zpos[playerid]);
	SetVehicleZAngle(vehid,Apos[playerid]);
	LinkVehicleToInterior(vehid,Interior[playerid]);
	return 1;
	}
	else
	{
	SetPlayerPos(playerid,Xpos[playerid],Ypos[playerid],Zpos[playerid]);
	SetPlayerFacingAngle(playerid,Apos[playerid]);
	SetPlayerInterior(playerid,Interior[playerid]);
	return 1;
	}
}
}
edit it to your variables
Reply


Messages In This Thread
save and loadpos - by XxerykxX - 06.11.2010, 17:46
Re: save and loadpos - by Mike_Peterson - 06.11.2010, 17:57
Re: save and loadpos - by XxerykxX - 06.11.2010, 18:04
Re: save and loadpos - by Mike_Peterson - 06.11.2010, 18:06
Re: save and loadpos - by XxerykxX - 06.11.2010, 18:19
Re: save and loadpos - by Mike_Peterson - 06.11.2010, 18:21
Re: save and loadpos - by XxerykxX - 06.11.2010, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)