gate problem..help please?
#1

ok guys i made a [MAP] and i released it...all is good!
and i want to update it by adding /open (to open the gate)
but it dont work? here's my code:

Код:
if (strcmp("/open", cmdtext, true, 10) == 0)
{
       MoveObject(object,1587.690,-1437.827,4.755, 2.00);
       SetTimer("close", 7000, 0);//gate will be  closed for 7 seconds
       SendClientMessage(playerid,COLOR_LIGHTBLUE,"You are opening a Gate, and will be closed automaticly..");
       return 1;}
}
	return 0;
}

public close()
{
    MoveObject(object,3439.1003417969, -1964.4346923828, 8.7441129684448, 3.00);
    return 1;
}
Reply
#2

any errors ?

PS: U gotta forward the timer
Reply
#3

-.-

There's no created object.
Reply
#4

pawn Код:
#include <a_samp>

new object;

forward close();
public close()
{
    MoveObject(object,3439.1003417969, -1964.4346923828, 8.7441129684448, 3.00);
}

public OnGameModeInit()
{
    object = CreateObject(etc..);
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/open", cmdtext, true, 10) == 0)
    {
       MoveObject(object,1587.690,-1437.827,4.755, 2.00);
       SetTimer("close", 7000, 0);//gate will be  closed for 7 seconds
       SendClientMessage(playerid,COLOR_LIGHTBLUE,"You are opening a Gate, and will be closed automaticly..");
       return 1;
    }

    return 0;
}
Array problem + you forget to add forward+ you forget to add new object and you didn't say that object is CreateObject(...);
Reply
#5

Sorry i didnt give good info but i did all that before and it didnt do nothing
Reply
#6

Tell me exactly what it does / doesnot do....
Reply
#7

well it doesnt do nothing when i do /open
Reply
#8

Can you show me your object = CreateObject(etc..); Code from OnGameModeInit
Reply
#9

just click the map link on my sig ...i wanna make the gate in that move...
Reply
#10

http://pastebin.com/nctJbBJv
BTW its a filterscript
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)