25.03.2010, 19:38
How can i make my FS with automatic gates automaticly close after 3 seconds ? This is my pawno code :
Code:
#include <a_samp>
new gate;
#define COLOR_YELLOW 0xFFFF00AA
public OnFilterScriptInit ()
{
gate = CreateObject(986,2560.146,-2227.251,13.071,0.0,0.0,90.000);
return 1;
}
public OnPlayerCommandText (playerid, cmdtext[])
{
if (strcmp(cmdtext, "/vipopen", true) == 0)
{
MoveObject(gate, 2560.146,-2235.245,13.071,3);
SendClientMessage(playerid, COLOR_YELLOW,"Welcome to V.I.P base.");
return 1;
}
if (strcmp(cmdtext, "/vipclose", true) == 0)
{
MoveObject(gate, 2560.146,-2227.251,13.071,3);
SendClientMessage(playerid, COLOR_YELLOW,"Come back later.");
return 1;
}
return 0;
}


