Moving gate open and close
#2

don't use "else"..also, why does it move the object to coords "0,0,0" then to 249.21007, -1760.01697, 7.74010?

On the open command the speed is also not set?

I reckon using zcmd and doing it like this

pawn Код:
CMD:open(playerid, params[])
{
if(sscanf(params, "open", params)
{
if(IsPlayerInRangeOfPoint(whatever)
{
//open object
}
if(sscanf(params, "close", params)
{
if(IsPlayerInRangeOfPoint(whatever)
{
//close object
}
This will give you one command for all your gates (open, close)..Just add a new "ifisplayerinrangeofpoint" for every new gate, it also uses zcmd and sscanf2, which are two includes every good scripter uses (and not so good :S) Drop me a PM if you wish me to give further assistance.

NOTE: This is a demo, notice the lack of indentations, and I think I left out a few closing braces
Reply


Messages In This Thread
Moving gate open and close - by SFA7X - 27.09.2013, 19:02
Re: Moving gate open and close - by Mattakil - 27.09.2013, 19:23

Forum Jump:


Users browsing this thread: 1 Guest(s)