http://pan.baidu.com/s/1pLaWt9x#include <a_samp>
forward MoneyTimer();
new mTimer,
mInt = 2,//间隔秒数
mRange = 10,//范围
mMoney = 100;//金额
public OnFilterScriptInit()
{
mTimer = SetTimer("MoneyTimer",mInt * 1000,true);
return 1;
}
public OnFilterScriptExit()
{
KillTimer(mTimer);
return 1;
}
public MoneyTimer()
{
for(new i = 0;i < MAX_PLAYERS;i ++)
{
if(IsPlayerInRangeOfPoint(i,mRange,0.000,0.000,0.000))//0,0,0坐标
{
GivePlayerMoney(i,mMoney);
}
}
return 1;
}