13.11.2013, 17:55
pawn Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
new Float:shax, Float:shay, Float:shaz;
new Float:shbx, Float:shby, Float:shbz;
new Float:shcx, Float:shcy, Float:shcz;
GetVehiclePos(EnterableShamals[0], shax, shay, shaz);
GetVehiclePos(EnterableShamals[1], shbx, shby, shbz);
GetVehiclePos(EnterableShamals[2], shcx, shcy, shcz);
for(new i = 0; i < sizeof(HouseInfo); i++)
{
// rest of the code of the /enter command
}
}
}
return 1;
}