03.01.2012, 14:00
(
Последний раз редактировалось Konstantinos; 09.01.2012 в 13:32.
)
Fixed!
CMD:atm1(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2166.80, 1905.00, 10.72))
{
ShowPlayerDialog(playerid, DIALOG_BANKMAIN, DIALOG_STYLE_LIST, "{FFFF00}Bank Account", "Create Bank Account\nLogin Bank Account", "Select", "Cancel");
}
else
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 2160.1636, 1904.6505, 10.8203);
SetPlayerFacingAngle(playerid, 273.6398);
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2166.80, 1905.00, 10.72))
{
ShowPlayerDialog(playerid, DIALOG_BANKMAIN, DIALOG_STYLE_LIST, "{FFFF00}Bank Account", "Create Bank Account\nLogin Bank Account", "Select", "Cancel");
}
}
return 1;
}
//...
SetTimer("SlowUpdate", 500, true);
//...
new bool:isInAtm[MAX_PLAYERS];
forward SlowUpdate();
public SlowUpdate()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(!IsPlayerConnected(playerid)) continue;
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2166.80, 1905.00, 10.72))
{
if(!isInAtm[playerid])
{
isInAtm[playerid] = true;
ShowPlayerDialog(playerid, DIALOG_BANKMAIN, DIALOG_STYLE_LIST, "{FFFF00}Bank Account", "Create Bank Account\nLogin Bank Account", "Select", "Cancel");
}
}
else if(isInAtm[playerid]) isInAtm[playerid] = false;
}
}