not work? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: not work? (
/showthread.php?tid=186311)
not work? -
Bogdanovic - 28.10.2010
IsObjectInArea
Код:
stock IsObjectInArea(objectid, Float:minx, Float:maxx, Float:miny, Float:maxy) {
new Float:x, Float:y, Float:z; GetObjectPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1; return 0; }
Re: not work? -
DeathOnaStick - 28.10.2010
Quote:
Originally Posted by Bogdanovic
IsObjectInArea
Код:
stock IsObjectInArea(objectid, Float:minx, Float:maxx, Float:miny, Float:maxy) {
new Float:x, Float:y, Float:z; GetObjectPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1; return 0; }
why don't work...?
Please Help, Thanks Advanced
|
You should really work on your indentation and stuff. Try if this works:
pawn Код:
IsObjectInArea(objectid, Float:minx, Float:maxx, Float:miny, Float:maxy) {
new Float:x, Float:y, Float:z;
GetObjectPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
else return 0;
}
Re: not work? -
Bogdanovic - 28.10.2010
Quote:
IsObjectInArea(objectid, Float:minx, Float:maxx, Float:miny, Float:maxy) {
new Float , Float:y, Float:z;
GetObjectPos(objectid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
else return 0;
}
|
Mmmh Nothing...
With a comand Set the Object in Area, and Start the Function with SetTimer -->
public ControlObject() {
if(IsObjectInArea(GOLF, * Pos GangZone *)) { SendClientMessageToAll(GREEN, "Object in Area..."); }
if(!IsObjectInArea(GOLF, * Pos GangZone *)) { SendClientMessageToAll(RED, "Object Not in Area..."); } }
Re: not work? -
Bogdanovic - 29.10.2010
....