Gate disappearing - 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: Gate disappearing (
/showthread.php?tid=153743)
Gate disappearing -
Galcio - 10.06.2010
Hello. I've lately started to get this problem when I close my gate with a command it just disappears. It turns invisible.
This is how my code looks like..
On top of script:
In OnGameModeInit:
pawn Код:
testgate = CreateObject(971, 2488.9069824219, -1667.0736083984, 15.963682174683, 0, 0, 0);
In OnPlayerCommandText:
pawn Код:
if(strcmp(cmdtext,"/testopen", true) == 0)
{
if(PlayerToPoint(30.0, playerid,2488.9069824219, -1667.0736083984, 15.963682174683))
{
MoveObject(testgate, 2497.9738769531, -1667.1553955078, 15.963682174683, 1.500000);
return 1;
}
}
if(strcmp(cmdtext,"/testclose", true) == 0)
{
if(PlayerToPoint(30.0, playerid,2488.9069824219, -1667.0736083984, 15.963682174683))
{
MoveObject(testgate, 2488.9069824219, -1667.0736083984, 15.963682174683, 1.500000);
return 1;
}
}
Note that this problem never occured until some days ago. If you know what the problem might be, don't hesitate to reply! Thanks.
Re: Gate disappearing -
Assyria - 10.06.2010
Maybe you have too many objects and that is bugging it?
Re: Gate disappearing -
Galcio - 10.06.2010
I don't understand why they would show at all if that's what you saying is true.
Edit: Plus I am using a streamer for all my other objects except the gates (39 "CreateObject"-objects, rest I'm using a streamer for). And it only happens when I use MoveObject on /closegate, but if I put SetObjectRot on /closegate instead it works, though. But I prefer MoveObject because it looks a better, so if anyone knows how to fix this, please tell me.
Re: Gate disappearing -
Jakku - 10.06.2010
Some months ago, I had too many objects created without a streamer. It made my server crash sometimes, objects didn't load and disappeared sometimes. Are you really sure that you don't have too many objects created with CreateObject?
Re: Gate disappearing -
Galcio - 10.06.2010
How many is too many?
Re: Gate disappearing -
Jakku - 10.06.2010
Max. amount you can have without problems is 254.
Re: Gate disappearing -
Galcio - 10.06.2010
Well, I have 39.
Re: Gate disappearing -
Jakku - 10.06.2010
Post your gate code.
E: Sry, you already have it
Quote:
Originally Posted by Assyria
Maybe you have too many objects and that is bugging it?
|
This isn't the problem, if he really has 39 objects created with CreateObject.
Which streamer are you using? I mean for other objects
Re: Gate disappearing -
Galcio - 10.06.2010
Used to use rStreamer, but right now I'm trying to install an other streamer (Incognito's streamer). But now I'm obviously getting this error "Run time error 19:".
Re: Gate disappearing -
Jakku - 10.06.2010
Use MidoStream. As I have heard, it's a good streamer. Try it.