27.09.2013, 19:23
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
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
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
}
NOTE: This is a demo, notice the lack of indentations, and I think I left out a few closing braces