20.12.2009, 20:47
so I script this :
how can I do to open the gate when the horn instead write the order?
Код:
#include <a_samp> #include <a_vehicles> #include <a_players> #include <k_functions> #pragma tabsize 0 new lspdgate; forward lspdgateclose(); public OnPlayerCommandText(playerid, cmdtext[]) if ((newkeys==KEY_CROUCH )&&(IsPlayerInCopCar(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) { GetPlayerSkin(playerid); if(IsPlayerSkin(playerid, 280) || IsPlayerSkin(playerid, 163) || IsPlayerSkin(playerid, 164) || IsPlayerSkin(playerid, 165) || IsPlayerSkin(playerid, 166) || IsPlayerSkin(playerid, 281) || IsPlayerSkin(playerid, 282) || IsPlayerSkin(playerid, 283) || IsPlayerSkin(playerid, 288) || IsPlayerSkin(playerid, 284) || IsPlayerSkin(playerid, 285) || IsPlayerSkin(playerid, 286) || IsPlayerSkin(playerid, 287)) { MoveObject(lspdgate, 1597.288696, -1637.887085, 14.706839, 4.0); SendClientMessage(playerid, 0xAAAAAAAA, "GATE OFFICER: Gate opened."); SetTimer("lspdgateclose",3000, false); } else { SendClientMessage(playerid, 0xAAAAAAAA,"GATE OFFICER: You have to be a cop to open this gate"); } } public lspdgateclose() { MoveObject(lspdgate, 1588.416260, -1637.907715, 14.705267, 3.0); }