SA-MP Forums Archive
[Ajuda] Goto OFF - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Goto OFF (/showthread.php?tid=559305)



Goto OFF - BPL - 22.01.2015

Код:
if(strcmp(cmd, "/goto", true) == 0)
	{
		if(AFK[playerid] == true) return SendClientMessage(playerid, CINZA, "{3cff00}[DS] {FFFFFF}Vocк nгo pode usar Comandos porque estб Ausente.");
		new PlayerB, string[300];
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) return SendClientMessage(playerid, VERMELHO, "{00FF00}[DS]{FFFFFF} /goto [id]");
		PlayerB = strval(tmp);
		if(AFK[PlayerB] == true) return SendClientMessage(playerid, VERMELHO, "{3cff00}[DS] {FFFFFF}Este jogador estб ausente.");
		if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, VERMELHO, "{3cff00}[DS] {FFFFFF}Este jogador nгo estб online.");
		GetPlayerPos(PlayerB, X, Y, Z);
		SetPlayerPos(playerid, X, Y+1, Z);
		if(GetPlayerState(playerid) == 2)
		{
			new carrro = GetPlayerVehicleID(playerid);
			SetVehiclePos(carrro, X, Y+1, Z);
			PutPlayerInVehicle(playerid, carrro, 0);
		}
		format(string, sizeof(string), "{3cff00}[DS] {FFFFFF}Vocк foi atй o jogador \"{f00c0c}%s.\"", Nome(PlayerB));
		SendClientMessage(playerid, VERDE, string);
		format(string, sizeof(string), "{3cff00}[DS] {FFFFFF}O jogador \"{f00c0c}%s\" {FFFFFF}Veio atй vocк.", Nome(playerid));
		SendClientMessage(PlayerB, VERDE, string);
		return 1;
	}
Quero um sistema que bloqueie o goto para o player que digitou /gotooff


Re: Goto OFF - JkS - 22.01.2015

@NOЙ


Re: Goto OFF - NexNix - 22.01.2015

Observe como base:

PHP код:
new bool:GotoAtivado true;
// comando gotoon
{
new 
PlayerB;
// Se o goto do player estiver ativado o comando vai funcionar normalmente.
if(GotoAtivado[PlayerB] == true
{
// Parametros
}
// Senгo vai aparecer essa mensagem.
else { SendClientMessage(playerid, -1"O goto do player estб desativado!"); }
// comando gotooff
{
GotoAtivado[playerid] = false;