20.03.2017, 13:13
(
Последний раз редактировалось Jihanz; 20.03.2017 в 14:17.
)
The title says it everything, why? But it works with whoever logged in first, it doesn't work with another.
this my stock
and My Public OnPlayerKeyStateChange
PHP код:
CMD:mine(playerid,params[])
{
MinerPlayer[playerid][Mining] = 1;
MinerPlayer[playerid][mProgress] = 0.0;
SetPlayerAttachedObject(playerid, ATTACH_INDEX, 19631, 6, 0.048, 0.029, 0.103, -80.0, 80.0, 0.0);
SetPlayerProgressBarValue(playerid,MinerPlayer[playerid][mBar],MinerPlayer[playerid][mProgress]);
ShowPlayerProgressBar(playerid,MinerPlayer[playerid][mBar]);
RandommKey(playerid);
return 1;
}
PHP код:
stock RandommKey(playerid)
{
MinerPlayer[playerid][mKey] = KEY_YES;
return 1;
}
PHP код:
if(MinerPlayer[playerid][Mining] == 1)
{
if(newkeys & KEY_YES)
{
if(MinerPlayer[playerid][mKey] == KEY_YES)
{
if(!IsPlayerInRangeOfPoint(playerid,5,mInfo[playerid][m_x],mInfo[playerid][m_y],mInfo[playerid][m_z])) return SendClientMessage(playerid,warna_merah,"Kamu tidak boleh keluar dari daerah Mine");
MinerPlayer[playerid][mProgress] += 5.0;
ApplyAnimation(playerid, "SWORD", "sword_4", 4.0, 0, 0, 0, 0, 0, 1);
SetPlayerProgressBarValue(playerid,MinerPlayer[playerid][mBar],MinerPlayer[playerid][mProgress]);
RandommKey(playerid);
if(MinerPlayer[playerid][mProgress] >= 100.0)
{
StopMine(playerid);
}
}
}
}