Salut,
Regarde ta fonction PlayerToPoint en bas, il te manque des acolades. met comme ceci:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
{
if(PlayerToPoint(6, playerID,-2935.0022,471.7132,4.9066,89.5392))//6 est la taille de la zone
{
MoveObject(dixon,-2937.887695, 472.968292, 6.679954, 3.5);//On bouge l'objet
SetTimer("Urban", 7000, 0);//On active le Timer
}
return 1;
}
Ensuite, il faut rajouter la fontion PlayerToPoint (nimporte ou dans le GM)
public PlayerToPoint(playerid, Float:radi, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}
Et ca devrai marcher.
Ensuite si tu veu que ca prenne de l'argent, il faut faire un GivePlayerMoney(playerid, -100) on enlève 100$ ici par exemple.
++
nikko