Jump to content
  • 0

Ajutor comanda /goto


rpg

Question

Problema intalnita (descriere):Cand scriu comanda /goto se teleporteaza mereu la id 0

Ero(area / rile) / warning-(ul / urile):-(nu-mi apar)

Imagini / Video (optional): -

Ati incercat sa rezolvati singur?: Da si nu stiu ce sa fac.

Liniile de cod / sursa / script-ul(obligatoriu): http://www.mediafire.com/download/5nxxn6odnm75q6f/Gm+pt+Rpg.rar

Edited by rpg

giphy.gif.418e22646746f7065f229917bd9fae15.gif

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Ba voi luati comenzile asa... fara sa ganditi? Nu stiti sa vi le creati invatati fratilor , cum doresti sa se teleporteze la un player daca nu i-ai definit acelui player coordonatele?

 

uite aici , dar nu mai veniti cu chestii de genu :mellow:

/*==============================================================================
Comanda: /goto
==============================================================================*/
CMD:goto(playerid,params[])
{
	if(IsPlayerConnected(playerid))
	{
	if(gPlayerLogged[playerid] != 0)
	{
	new Float:PosX, Float:PosY, Float:PosZ, 
		Float:PosIDX, Float:PosIDY, Float:PosIDZ, 
		string[256], sendername[MAX_PLAYER_NAME], giveplayername[MAX_PLAYER_NAME], ID;
		
	if(sscanf(params, "u", ID)) 
			return SendClientMessage(playerid, -1, ""PORTOCALIU"Scrie: "ALBASTRU2"/goto [Player ID]");
			
	GetPlayerName(playerid, sendername, sizeof(sendername));
	GetPlayerName(ID, giveplayername, sizeof(giveplayername));
	
	SetPlayerPos(playerid, PosX, PosY , PosIDZ);
	SetPlayerPos(ID, PosIDX, PosIDY , PosIDZ);
	
	if(IsPlayerConnected(ID))
	{
	if(ID != INVALID_PLAYER_ID)
	{
	if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
	{
		GetPlayerPos(ID, PosIDX, PosIDY, PosIDZ);
		if (GetPlayerState(playerid) == 2 || GetPlayerState(playerid) == 3)
		{
			new tmpcar = GetPlayerVehicleID(playerid);
			SetVehiclePos(tmpcar, PosIDX, PosIDY + 4, PosIDZ);
			TelePos[playerid][0] = 0.0; TelePos[playerid][1] = 0.0;
			LinkVehicleToInterior(tmpcar, GetPlayerInterior(ID));
			SetVehicleVirtualWorld(tmpcar, GetPlayerVirtualWorld(ID));
			SetPlayerInterior(playerid, GetPlayerInterior(ID));
			SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ID));

		}
		else
		{
			SetPlayerPos(playerid, PosIDX, PosIDY + 2, PosIDZ);
			SetPlayerInterior(playerid, GetPlayerInterior(ID));
			SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ID));
		}
		format(string, 256, ""GRI3"You have been teleported to: %s", giveplayername);
		SendClientMessage(playerid, -1, string);
		format(string, 256, ""PORTOCALIU"Admin Warning: "GALBEN"%s a folosit comanda "VERDE"/goto "GALBEN"si s-a teleportat la %s", sendername, giveplayername);
		AdminsMessage(-1, string);
		format(string, 256, ""PORTOCALIU"Helper Warning: "GALBEN"%s a folosit comanda "VERDE"/goto "GALBEN"si s-a teleportat la %s", sendername, giveplayername);
		HeadHelpersMessage(-1, string);
		GetPlayerPos(playerid, PosX, PosY, PosZ);
		GBPosX[playerid] = PosX;
		GBPosY[playerid] = PosY;
		GBPosZ[playerid] = PosZ;
	}
		else return SendClientMessage(playerid, -1, ""ALBASTRU2"Nu ai autorizatia sa folosesti aceasta comanda !");
	}
	}
		else return SendClientMessage(playerid, -1, ""GRI3"Acest player nu este conectat");
	}
		else return SendClientMessage(playerid, -1, ""ALBASTRU2"Nu esti conectat !");
	}
return 1;
}
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.