- 0
IsObjectInArea...(Rezolvat ;) :) Am folosit ObjectToPoint ...)
-
Similar Content
-
- 0 replies
- 679 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
[RSS]RuNix
salut ;D...
ma puteti ajuta putin ... cei care stiti ...
deci:
am pus la OnGameModeInit
SetTimer("MingeAfara",100,1); football=CreateObject(1598,1520.948,-1133.519,135.133,0.0,0.0,0.0);am pusforward MingeAfara(); public MingeAfara() { if(!IsObjectInArea(football,1562.119, 1501.274, -1109.439, -1156.812)) { DestroyObject(football); football=CreateObject(1598,1520.948,-1133.519,135.133,0.0,0.0,0.0); } return 1; }la sfarsitul scriptului si mai jos am creat functia IsObjectInArea...stock IsObjectInArea(objectid, Float:minX, Float:maxX, Float:minY, Float:maxY) { new Float:x,Float:y,Float:z; GetObjectPos(objectid, x,y,z); if (x > minX && x < maxX && y > minY && y < maxY) return true; return false; }... apoi am dat compile sperand ca daca acel object va depasi acea Area(Zona) il va pune inapoi
chestia asta am folosito la un mod de football ... dar uneori mingea iesea din teren si eu am vrut sa fac ca atunci cand iese din teren sa se puna inapoi la loc in mijloc ... dar o data ce am facut aceasta functie obiectul sta mereu in mijloc si nu il mai pot misca deloc... eu il misc iar el se pune repede inapoi chiar daca nu a depasit acea zona ...
imi puteti spune ce am gresit si sa ma corectati ?
Multumesc:)
4 answers to this question
Recommended Posts