19.10.2009, 23:57
hey i made a elevator that goes up and down with gates but i'm having trouble with it. the gate is buggy. i seen it a few times the gates didnt keep up with the walls and once it gets there the gates freeze i see it move up and down for like a second any solutions?
Contact me at Troy52192@live.com For Email or MSN: Troy52192@live.com , Xfire: Troy52192 , Aim: Troy52192@aol.com For Live Chat
Contact me at Troy52192@live.com For Email or MSN: Troy52192@live.com , Xfire: Troy52192 , Aim: Troy52192@aol.com For Live Chat
Код:
#include <a_samp> new afloor; new aright; new aleft; new atop; new afront; new aback; forward aele1(playerid); forward aele2(playerid); forward aele3(playerid); forward aele4(playerid); forward aele5(playerid); forward aele6(playerid); forward aele7(playerid); //------------------------------------------------------------------------------ public OnGameModeInit(){ afloor=CreateObject(16775,1287.08,-841.29,82.14,90.00,0.00,90.00); aright=CreateObject(16775,1290.98,-841.29,86.04,0.00,0.00,90.00); aleft=CreateObject(16775,1283.18,-841.29,86.04,0.00,0.00,90.00); atop=CreateObject(16775,1287.08,-841.29,90.14,90.00,0.00,90.00); aback=CreateObject(985,1287.07,-848.53,83.92,0.00,0.00,0.00); afront=CreateObject(985,1287.03,-834.10,83.91,0.00,0.00,0.00); return 1;} //------------------------------------------------------------------------------ public OnPlayerCommandText(playerid, cmdtext[]){ if (strcmp("/aele", cmdtext, true, 10) == 0){ SendClientMessage(playerid, 0x33FF33AA, "Opening..."); MoveObject(afront,1287.03,-834.09,76.91,3); SetTimer("aele1",5000, 1); return 1;} return 0;} public aele1(playerid){ SendClientMessage(playerid, 0xFF0000AA, "Closing..."); MoveObject(afront,1287.03,-834.10,83.91,3); SetTimer("aele2",5000, 1); } //------------------------------------------------------------------------------ public aele2(playerid){ SendClientMessage(playerid, 0xFFFF00AA, "Going Up..."); MoveObject(afloor,1287.07,-891.28,132.13,3); MoveObject(aright,1290.97,-891.28,136.04,3); MoveObject(aleft,1283.18,-891.28,136.04,3); MoveObject(atop,1287.07,-891.28,140.13,3); MoveObject(aback,1287.07,-898.53,133.92,3); MoveObject(afront,1287.03,-884.10,133.91,3); SetTimer("aele3",5000, 1); } //------------------------------------------------------------------------------ public aele3(playerid){ SendClientMessage(playerid, 0x33FF33AA, "Opening..."); MoveObject(aback,1287.07,-898.53,126.91,3); SetTimer("aele4",30000, 1); } //------------------------------------------------------------------------------ public aele4(playerid){ SendClientMessage(playerid, 0xFF0000AA, "Closing..."); MoveObject(aback,1287.07,-898.53,133.92,3); SetTimer("aele5",20000, 1); } //------------------------------------------------------------------------------ public aele5(playerid){ SendClientMessage(playerid, 0xFFFF00AA, "Going Down..."); MoveObject(afloor,1287.08,-841.29,82.1,3); MoveObject(aright,1290.98,-841.29,86.04,3); MoveObject(aleft,1283.18,-841.29,86.04,3); MoveObject(atop,1287.08,-841.29,90.14,3); MoveObject(aback,1287.07,-848.53,83.92,3); MoveObject(afront,1287.03,-834.10,83.91,3); SetTimer("aele6",5000, 1); } //------------------------------------------------------------------------------ public aele6(playerid){ SendClientMessage(playerid, 0x33FF33AA, "Opening..."); MoveObject(afront,1287.03,-834.09,76.91,3); SetTimer("aele7",5000, 1); } //------------------------------------------------------------------------------ public aele7(playerid){ SendClientMessage(playerid, 0xFF0000AA, "Closing..."); MoveObject(afront,1287.03,-834.10,83.91,3); } //------------------------------------------------------------------------------