Plz help /goto problem
#1

Hi im translating an RP mod and im translated /goto teleportings and when im goed to my own server (im max level admin) and when im try to use /goto or /gotoid his says u not authorized that command!
When im translated the goto things im doed somethin wrong? plz help
Reply
#2

Post the code.
Reply
#3

what code?
Reply
#4

Quote:
Originally Posted by zalyy
what code?
of your /goto command...
Reply
#5

post the command code
Reply
#6

There it is i not know is it 100% :

Код:
	if (strcmp(cmdtext, "/gotoxyz", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			new Float:X, Float:Y, Float:Z;
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "HASZNБLAT: /gotoxyz [cords]");
				return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
				SendClientMessage(playerid, COLOR_GREEN, " ** Elteleportбltбl ezekhez a kordinatбkhoz X, Y, Z !");
				SetPlayerPos(playerid, X, Y, Z);
    	}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Nem hasznбlhatod ezt a parancsot!");
			}
		}
		return 1;
	}
	if (strcmp(cmdtext, "/goto", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
    	  	ShowPlayerDialog(playerid, GOTOMENU, DIALOG_STYLE_LIST, "Teleportok","LS\nSF\nLV\nJet\nBank\nInt\nMC\nSAST\nstad\nBхrtцn\nStadium 2\nAll Saints\nFehйr Hбz\nReptйr\nEdzхterem\nCounty\nFBI\nHitman HQ\nDMV\nLab1 ", "Goto", "Cancel");
    	}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Nem hasznбlhatod ezt a parancsot!");
			}
		}
		return 1;
	}
And others:

Код:
/*----------------------------------[Goto Safe]---------------------------------*/
	if(strcmp(cmd, "/gotosafe", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, 2175.2559,-994.4435,62.6977);
					SetVehicleZAngle(tmpcar, 350);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				{
					SetPlayerPos(playerid, 2287.4226,-933.3575,26.4948);
				}
				SendClientMessage(playerid, COLOR_GRAD1, "  You have been teleported !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Nem hasznбlhatod ezt a parancsot !");
			}
		}
		return 1;
	}
/*----------------------------------[Goto LS]---------------------------------
	if(strcmp(cmd, "/gotols", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				{
					SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
				}
				SendClientMessage(playerid, COLOR_GRAD1, "  You have been teleported !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Nem hasznбlhatod ezt a parancsot!");
			}
		}
		return 1;
	}
//----------------------------------[Goto LV]---------------------------------
	if(strcmp(cmd, "/gotolv", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				{
					SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
				}
				SendClientMessage(playerid, COLOR_GRAD1, "  You have been teleported");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Nem hasznбlhatod ezt a parancsot!");
			}
		}
		return 1;
	}
//----------------------------------[Goto SF]---------------------------------
	if(strcmp(cmd, "/gotosf", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, -1417.0,-295.8,14.1);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				{
					SetPlayerPos(playerid, -1417.0,-295.8,14.1);
				}
				SendClientMessage(playerid, COLOR_GRAD1, "  You have been teleported");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Nem hasznбlhatod ezt a parancsot!");
			}
		}
		return 1;
	}
//----------------------------------[Goto Bank]---------------------------------
	if(strcmp(cmd, "/gotobank" , true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 2)
			{
				new vehicleid;
				vehicleid = GetPlayerVehicleID(playerid);
 				SetVehiclePos(vehicleid, 1459.2296,-1023.7513,23.8331);
				SetPlayerPos(playerid, 1459.2296,-1023.7513,23.8331);
				SendClientMessage(playerid, COLOR_ALLDEPT, "You have been teleported to Los Santos Bank.");
				SetPlayerInterior(playerid,0);
				SetPlayerVirtualWorld(playerid,0);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, " You aren't authorized to use this command!");
				return 1;
			}
}
		return 1;
}
And /gotoid

Код:
  if(strcmp(cmd, "/gotoid", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "HASZNБLAT: /gotoid [playerid/PartOfName]");
				return 1;
			}
			new Float:plocx,Float:plocy,Float:plocz;
			new plo;
			plo = ReturnUser(tmp);
			if (IsPlayerConnected(plo))
			{
			  if(plo != INVALID_PLAYER_ID)
			  {
					if (PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pGM] >= 3 || PlayerInfo[playerid][pGMOnDuty] == 1)
					{
						if(Spectate[playerid] != 255)
						{
							Spectate[playerid] = 256;
						}
						GetPlayerPos(plo, plocx, plocy, plocz);
						if(PlayerInfo[plo][pInt] > 0)
						{
							SetPlayerInterior(playerid,GetPlayerInterior(plo));
							PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
							PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
						}
						if (GetPlayerState(playerid) == 2)
						{
							new tmpcar = GetPlayerVehicleID(playerid);
							SetVehicleVirtualWorld(tmpcar, GetPlayerVirtualWorld(plo));
							SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
							SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
							TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
							SetPlayerInterior(playerid,GetPlayerInterior(plo));
							PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
							PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
						}
						else
						{
							SetPlayerPos(playerid,plocx,plocy+2, plocz);
							SetPlayerInterior(playerid,GetPlayerInterior(plo));
							SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
						}
						SendClientMessage(playerid, COLOR_GRAD1, "  You have been teleported");
					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD1, "  Nem hasznбlhatod ezt a parancsot!");
					}
				}
			}
			else
			{
				format(string, sizeof(string), "  %d is not an active player.", plo);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
End :S little bit large...
Reply
#7

i cant solve it
Reply
#8

/goto isnt inthere??
Reply
#9

what??
Reply
#10

/goto
isnt
in
what
u
posted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)