need help with compile error and warning
#5

pawn Код:
#include <a_samp>
//-----define------
#define FILTERSCRIPT
#define COLOR_DARKBLUE 0x0000D0FF
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_LIGHTBLUE 0xBBFFFFFF
#define COLOR_BLACK 0x000000FF
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW2 0xFFCC33FF
#define COLOR_ALLDEPT 0xFF8282AA
#if defined FILTERSCRIPT
//------new files------
new poort1;
new poort2;
new i;
//------forwardings---------
forward sluitpoort1();
forward sluitpoort2();
forward IsPlayerInArea(playerid, Float:maxx, Float:minx, Float:maxy, Float:miny);


public OnFilterScriptInit()

{
print("|__________________poorten_script_______________|");
print("|___________Created By Thomas_Walters___________|");
print("|___________________© 2009____________________|");

//---gesloten poorten---
poort1 = CreateObject(969, 2228.108887, -2209.316162, 12.713751, 0.0000, 0.0000, -45);//poort1 vooraan (gesloten)
poort2 = CreateObject(969, 2234.360352, -2215.564209, 12.713753, 0.0000, 0.0000, -45);//poort2 vooraan (gesloten)
return 1;
}


public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print(" COCA-COLA poorten_script LOADED");
}

#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/colahelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, COLOR_BLACK, "__________________________________________________");
        SendClientMessage(playerid, COLOR_DARKBLUE, "|~|~|gate_Commands|~|~|");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "/COCA-COLA - This opens the COCA-COLA fabriek gate.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "/stockplaats - This opens the gate of the magazein.");
        SendClientMessage(playerid, COLOR_BLACK, "__________________________________________________");
    return 1;
    }
    if(strcmp(cmdtext,"/COCA-COLA",true)==0)//poort 1,2
    {
    if(IsPlayerInArea(i, 1588.9767,-1642.4318,12.3557,183.5738))
    {
        MoveObject(poort1,2228.108887, -2209.316162, 12.713751,3);//gesloten (poort1)
        MoveObject(poort1,2223.254883, -2204.496338, 12.713753,3);//open (poort1)
        SetTimer("sluitpoort1", 5000, 0);
        MoveObject(poort2,2234.360352, -2215.564209, 12.713753,3);//gesloten (poort2)
        MoveObject(poort2,2239.288574, -2220.468018, 12.713753,3);//open (poort2)
        SetTimer("sluitpoort2", 5000, 0);
        GameTextForPlayer(playerid, "~w~COCA-COLA gate ~g~open", 5000, 1);
        SendClientMessage(playerid, COLOR_YELLOW2,"Welcome to the COCA-COLA fabriek the Gate will Close in 5 Seconds");
   }
  }
return 1;
}
  return 0;
}


public sluitpoort1()
{
    MoveObject(poort1,2223.254883, -2204.496338, 12.713753,3);//open
    MoveObject(poort1,2228.108887, -2209.316162, 12.713751,3);//gesloten

}
public sluitpoort2()
{
    MoveObject(poort2,2239.288574, -2220.468018, 12.713753,3);//open
    MoveObject(poort2,2234.360352, -2215.564209, 12.713753,3);//gesloten

}

public IsPlayerInArea(playerid, Float:maxx, Float:minx, Float:maxy, Float:miny)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
Try now.
Reply


Messages In This Thread
need help with compile error and warning - by darkhuman - 21.06.2009, 21:53
Re: need help with compile error and warning - by godforbid - 21.06.2009, 22:28
Re: need help with compile error and warning - by BP13 - 21.06.2009, 23:16
Re: need help with compile error and warning - by darkhuman - 22.06.2009, 10:34
Re: need help with compile error and warning - by arnutisz - 22.06.2009, 10:39
Re: need help with compile error and warning - by darkhuman - 22.06.2009, 10:44
Re: need help with compile error and warning - by darkhuman - 24.06.2009, 19:15

Forum Jump:


Users browsing this thread: 1 Guest(s)