[Ajuda] Apertar Letra F pra acessar
#4

Код:
#include a_samp

/*
//Copilar
enum pInfo
{
	pMembro,
	pLider
}
new PlayerInfo[MAX_PLAYERS][pInfo];
*/

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
	{
		if(IsPlayerInRangeOfPoint(playerid,1, 1327.2062, -877.5867, 39.5781))
		{
			if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)
			{
				TogglePlayerControllable(playerid, 0);
				ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, "Cofre", "{00FF1E}Dinheiro\n{2C221A}Materiais\n{00EBFF}Maconha\n{FF00B9}Cocaina\n{FF0005}Crack", "Confirmar", "Cancelar");
			}
			
		}
		else if(IsPlayerInRangeOfPoint(playerid,1, 0, 0, 0))
		{
			if(PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2)
			{
				TogglePlayerControllable(playerid, 0);
				ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, "Cofre", "{00FF1E}Dinheiro\n{2C221A}Materiais\n{00EBFF}Maconha\n{FF00B9}Cocaina\n{FF0005}Crack", "Confirmar", "Cancelar");
			}
		}
		
		//USE: "else if" para add mais cofres, sempre antes do "else" abaixo.
		
		else
		{
		    SendClientMessage(playerid, -1, "Vocк nгo й dessa organizaзгo!");
		}
	}
}
Reply


Messages In This Thread
Apertar Letra F pra acessar - by MoitaGreen - 07.06.2013, 01:43
Re: Apertar Letra F pra acessar - by Exco - 07.06.2013, 01:48
Re: Apertar Letra F pra acessar - by MoitaGreen - 07.06.2013, 01:52
Re: Apertar Letra F pra acessar - by Exco - 07.06.2013, 17:56

Forum Jump:


Users browsing this thread: 1 Guest(s)