im trying to make a fs for the first time and iv got some errors and does anyone know what to do?
pawn Код:
#include <a_samp>
#include <streamer>
#define COLOR_BLUE1 0x0077dbff
#define COLOR_GREY 0xAFAFAFAA
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward GateClose(playerid);
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
forward ProxDetectorS(Float:radi, playerid, targetid);
new Tollgate1;
new sendername[MAX_PLAYER_NAME];
public OnFilterScriptInit( )
{
print( "\n[FS] *************************" );
print( "[FS] * Tom1412 Toll system *" );
print( "[FS] * Loaded ... *" );
print( "[FS] *************************\n" );
}
public OnFilterScriptExit( )
{
print( "\n[FS] *************************" );
print( "[FS] * Tom1412 Toll system *" );
print( "[FS] * Unloaded ... *" );
print( "[FS] *************************\n" );
}
public GateClose(playerid)
{
MoveObject(Tollgate1,1750.8842773438,530.06420898438,29.082275390625, 0.97);
return 1;
}
Tollgate1 = CreateObject(980, 1750.8842773438, 530.06420898438, 29.082275390625, 0, 0, 341);
public OnPlayerCommandText( playerid, cmdtext[] )
if ( strcmp( cmdtext, "/test", true, 5 ) == 0 )
{
if (PlayerToPoint(15, playerid,1750.8842773438,530.06420898438,29.082275390625))
{
MoveObject(Tollgate1,1750.8842773438,530.06420898438,20.082275390625, 0.8);
SetTimer("GateClose", 12000, 0);
SendClientMessage(playerid, COLOR_BLUE1,"Thanx for paying.\n Have a nice day.");
GetPlayerName(playerid, sendername, sizeof(sendername));
//format(string, sizeof(string), "* %s takes his/her remote and opens a garage.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else { SendClientMessage(playerid, COLOR_GREY,"Destination is too far."); }
}
else return SendClientMessage(playerid, COLOR_GREY,"You don't have a remote control.");
return 1;
}
return 0;
}
the fs is on the link called "the hole fs", also how do i make it automatic so when some one is at the gate it will open automatic?