{HELP}please can you see some mistake here GATES
#5

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;'.
Changes highlighted in red.
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;'.

Hope this helped!
Reply


Messages In This Thread
{HELP}please can you see some mistake here GATES - by krisko - 11.08.2009, 21:45
Re: {HELP}please can you see some mistake here GATES - by RyDeR` - 11.08.2009, 21:47
Re: {HELP}please can you see some mistake here GATES - by pagie1111 - 11.08.2009, 22:15
Re: {HELP}please can you see some mistake here GATES - by krisko - 11.08.2009, 22:23
Re: {HELP}please can you see some mistake here GATES - by PowerSurge - 21.08.2009, 15:44

Forum Jump:


Users browsing this thread: 1 Guest(s)