21.08.2009, 15:44
pawn Код:
#include <a_samp>
#define BLUE 0x0000BBAA // Color Code
new Gate;
forward GateClose(playerid);
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" house gate's by Krisko_Milchev");
print("--------------------------------------\n");
Gate = CreateObject(994, -767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0);
CreateObject(994, -767.1913 ,92.0703, 349.5082, 0 , 0 ,0 , 0, 0, 0);
CreateObject(994, -767.1913, 92.0703, 349.5082, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public GateClose(playerid)
{
MoveObject(Gate,-767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0); // Looks more realistic :)
return 1; //You put 'return 1', remember the Semi-Colons! (;)
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/gateopen", true)==0)
{
MoveObject(Gate,-767.1913,92.0703,349.5082,0,0,0,0,0,0);
SendClientMessage(playerid, BLUE, "The house door has been opened please wait 10 seconds!");
SetTimer("GateClose", 10000, 0); // You defined GateClose, and put GateClose1.
return 1;
}
return 0;
} // At the end of this public, you need 'return 0;'.
Quote:
#include <a_samp> #define COLOR_BLUE 0x0000BBAA // You didnt define the color! new Gate; forward GateClose(playerid); public OnFilterScriptInit() { print("\n--------------------------------------"); print(" house gate's by Krisko_Milchev"); print("--------------------------------------\n"); Gate = CreateObject(994, -767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0); CreateObject(994, -767.1913 ,92.0703, 349.5082, 0 , 0 ,0 , 0, 0, 0); CreateObject(994, -767.1913, 92.0703, 349.5082, 0, 0, 0, 0, 0, 0); return 1; } public OnFilterScriptExit() { return 1; } public GateClose(playerid) { MoveObject(Gate,-767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0); // Looks more realistic return 1; //You put 'return 1', remember the Semi-Colons! ( } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/gateopen", true)==0) { MoveObject(Gate,-767.1913,92.0703,349.5082,0,0,0,0,0,0); SendClientMessage(playerid, BLUE, "The house door has been opened please wait 10 seconds!"); SetTimer("GateClose", 10000, 0); // You defined GateClose, and put GateClose1. return 1; } return 0; } // At the end of this public, you need 'return 0;'. |