09.07.2010, 21:51
I need help please,I need a good scripter who can help me at script on a clan base add me a gates open with Key_Fire
Please.
Please.
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new gate;
public OnGameModeInit()
{
gate = CreateObject(objectid, objectx, objecty, objectz, xrotation, yrotation, zrotation);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
if(IsPlayerInRangeOfPoint(playerid, range, objectx,objecty,objectz))
{
MoveObject(gate, newx, newy, newz, speed);
}
}
return 1;
}
#define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) new gate; public OnFilterScriptInit() // change just here duh' { gate = CreateObject(objectid, objectx, objecty, objectz, xrotation, yrotation, zrotation); return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (PRESSED(KEY_FIRE)) { if(IsPlayerInRangeOfPoint(playerid, range, objectx,objecty,objectz)) { MoveObject(gate, newx, newy, newz, speed); } } return 1; }