19.06.2011, 11:18
PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
new gate;
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
gate = CreateObject(980,785.68078613,-1152.40832520,25.42964172,0.00000000,0.00000000,272.00000000); //object(airportgate) (2)
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
{
if (!strcmp("/Closegate", cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 785.68078613,-1152.40832520,25.42964172))
{
MoveObject(gate, 785.68078613,-1152.40832520,25.42964172, 1);
}
return 1;
}
if (!strcmp("/Opengate", cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 785.68078613,-1152.40832520,19.67964172))
{
MoveObject(gate, 785.68078613,-1152.40832520,19.67964172, 1);
}
return 2;
}